--- brackets-shell/appshell/client_handler.h +++ brackets-shell/appshell/client_handler.h @@ -16,7 +16,13 @@ #include - +#if defined(OS_LINUX) +// The Linux client uses GTK instead of the underlying platform type (X11). +#include +#define ClientWindowHandle GtkWidget* +#else +#define ClientWindowHandle CefWindowHandle +#endif // Define this value to redirect all popup URLs to the main application browser // window. @@ -184,13 +190,13 @@ const CefKeyEvent& event, CefEventHandle os_event) OVERRIDE; - void SetMainHwnd(CefWindowHandle hwnd); - CefWindowHandle GetMainHwnd() { return m_MainHwnd; } - void SetEditHwnd(CefWindowHandle hwnd); - void SetButtonHwnds(CefWindowHandle backHwnd, - CefWindowHandle forwardHwnd, - CefWindowHandle reloadHwnd, - CefWindowHandle stopHwnd); + void SetMainHwnd(ClientWindowHandle hwnd); + ClientWindowHandle GetMainHwnd() { return m_MainHwnd; } + void SetEditHwnd(ClientWindowHandle hwnd); + void SetButtonHwnds(ClientWindowHandle backHwnd, + ClientWindowHandle forwardHwnd, + ClientWindowHandle reloadHwnd, + ClientWindowHandle stopHwnd); CefRefPtr GetBrowser() { return m_Browser; } int GetBrowserId() { return m_BrowserId; } @@ -240,7 +246,7 @@ static void CreateRequestDelegates(RequestDelegateSet& delegates); // The main frame window handle - CefWindowHandle m_MainHwnd; + ClientWindowHandle m_MainHwnd; // The child browser window. This is only set for the FIRST client window. // The browser id for m_Browser is stored in m_BrowserId. @@ -257,13 +263,13 @@ int m_BrowserId; // The edit window handle - CefWindowHandle m_EditHwnd; + ClientWindowHandle m_EditHwnd; // The button window handles - CefWindowHandle m_BackHwnd; - CefWindowHandle m_ForwardHwnd; - CefWindowHandle m_StopHwnd; - CefWindowHandle m_ReloadHwnd; + ClientWindowHandle m_BackHwnd; + ClientWindowHandle m_ForwardHwnd; + ClientWindowHandle m_StopHwnd; + ClientWindowHandle m_ReloadHwnd; // Support for logging. std::string m_LogFile; @@ -279,7 +285,7 @@ ProcessMessageDelegateSet process_message_delegates_; RequestDelegateSet request_delegates_; - typedef std::map< CefWindowHandle, CefRefPtr > BrowserWindowMap; + typedef std::map< ClientWindowHandle, CefRefPtr > BrowserWindowMap; static BrowserWindowMap browser_window_map_; typedef std::map > CommandCallbackMap; @@ -293,3 +299,4 @@ }; #endif // CEF_TESTS_CEFCLIENT_CLIENT_HANDLER_H_ +