| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 #ifndef CONTENT_SHELL_BROWSER_SHELL_H_ | 4 #ifndef CONTENT_SHELL_BROWSER_SHELL_H_ |
| 5 #define CONTENT_SHELL_BROWSER_SHELL_H_ | 5 #define CONTENT_SHELL_BROWSER_SHELL_H_ |
| 6 | 6 |
| 7 | 7 |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 62 | 62 |
| 63 void LoadURL(const GURL& url); | 63 void LoadURL(const GURL& url); |
| 64 void LoadURLForFrame(const GURL& url, const std::string& frame_name); | 64 void LoadURLForFrame(const GURL& url, const std::string& frame_name); |
| 65 void GoBackOrForward(int offset); | 65 void GoBackOrForward(int offset); |
| 66 void Reload(); | 66 void Reload(); |
| 67 void Stop(); | 67 void Stop(); |
| 68 void UpdateNavigationControls(); | 68 void UpdateNavigationControls(); |
| 69 void Close(); | 69 void Close(); |
| 70 void ShowDevTools(); | 70 void ShowDevTools(); |
| 71 void CloseDevTools(); | 71 void CloseDevTools(); |
| 72 #if (defined(OS_WIN) && !defined(USE_AURA)) || \ | 72 #if defined(TOOLKIT_GTK) || defined(OS_MACOSX) |
| 73 defined(TOOLKIT_GTK) || defined(OS_MACOSX) | |
| 74 // Resizes the main window to the given dimensions. | 73 // Resizes the main window to the given dimensions. |
| 75 void SizeTo(const gfx::Size& content_size); | 74 void SizeTo(const gfx::Size& content_size); |
| 76 #endif | 75 #endif |
| 77 | 76 |
| 78 // Do one time initialization at application startup. | 77 // Do one time initialization at application startup. |
| 79 static void Initialize(); | 78 static void Initialize(); |
| 80 | 79 |
| 81 static Shell* CreateNewWindow(BrowserContext* browser_context, | 80 static Shell* CreateNewWindow(BrowserContext* browser_context, |
| 82 const GURL& url, | 81 const GURL& url, |
| 83 SiteInstance* site_instance, | 82 SiteInstance* site_instance, |
| (...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 199 const WebContents* web_contents) const; | 198 const WebContents* web_contents) const; |
| 200 #endif | 199 #endif |
| 201 | 200 |
| 202 gfx::NativeView GetContentView(); | 201 gfx::NativeView GetContentView(); |
| 203 | 202 |
| 204 // WebContentsObserver | 203 // WebContentsObserver |
| 205 virtual void TitleWasSet(NavigationEntry* entry, bool explicit_set) OVERRIDE; | 204 virtual void TitleWasSet(NavigationEntry* entry, bool explicit_set) OVERRIDE; |
| 206 | 205 |
| 207 void OnDevToolsWebContentsDestroyed(); | 206 void OnDevToolsWebContentsDestroyed(); |
| 208 | 207 |
| 209 #if defined(OS_WIN) && !defined(USE_AURA) | 208 #if defined(TOOLKIT_GTK) |
| 210 static ATOM RegisterWindowClass(); | |
| 211 static LRESULT CALLBACK WndProc(HWND, UINT, WPARAM, LPARAM); | |
| 212 static LRESULT CALLBACK EditWndProc(HWND, UINT, WPARAM, LPARAM); | |
| 213 #elif defined(TOOLKIT_GTK) | |
| 214 CHROMEGTK_CALLBACK_0(Shell, void, OnBackButtonClicked); | 209 CHROMEGTK_CALLBACK_0(Shell, void, OnBackButtonClicked); |
| 215 CHROMEGTK_CALLBACK_0(Shell, void, OnForwardButtonClicked); | 210 CHROMEGTK_CALLBACK_0(Shell, void, OnForwardButtonClicked); |
| 216 CHROMEGTK_CALLBACK_0(Shell, void, OnReloadButtonClicked); | 211 CHROMEGTK_CALLBACK_0(Shell, void, OnReloadButtonClicked); |
| 217 CHROMEGTK_CALLBACK_0(Shell, void, OnStopButtonClicked); | 212 CHROMEGTK_CALLBACK_0(Shell, void, OnStopButtonClicked); |
| 218 CHROMEGTK_CALLBACK_0(Shell, void, OnURLEntryActivate); | 213 CHROMEGTK_CALLBACK_0(Shell, void, OnURLEntryActivate); |
| 219 CHROMEGTK_CALLBACK_0(Shell, gboolean, OnWindowDestroyed); | 214 CHROMEGTK_CALLBACK_0(Shell, gboolean, OnWindowDestroyed); |
| 220 | 215 |
| 221 CHROMEG_CALLBACK_3(Shell, gboolean, OnCloseWindowKeyPressed, GtkAccelGroup*, | 216 CHROMEG_CALLBACK_3(Shell, gboolean, OnCloseWindowKeyPressed, GtkAccelGroup*, |
| 222 GObject*, guint, GdkModifierType); | 217 GObject*, guint, GdkModifierType); |
| 223 CHROMEG_CALLBACK_3(Shell, gboolean, OnNewWindowKeyPressed, GtkAccelGroup*, | 218 CHROMEG_CALLBACK_3(Shell, gboolean, OnNewWindowKeyPressed, GtkAccelGroup*, |
| (...skipping 11 matching lines...) Expand all Loading... |
| 235 scoped_ptr<DevToolsWebContentsObserver> devtools_observer_; | 230 scoped_ptr<DevToolsWebContentsObserver> devtools_observer_; |
| 236 ShellDevToolsFrontend* devtools_frontend_; | 231 ShellDevToolsFrontend* devtools_frontend_; |
| 237 | 232 |
| 238 bool is_fullscreen_; | 233 bool is_fullscreen_; |
| 239 | 234 |
| 240 gfx::NativeWindow window_; | 235 gfx::NativeWindow window_; |
| 241 gfx::NativeEditView url_edit_view_; | 236 gfx::NativeEditView url_edit_view_; |
| 242 | 237 |
| 243 gfx::Size content_size_; | 238 gfx::Size content_size_; |
| 244 | 239 |
| 245 #if defined(OS_WIN) && !defined(USE_AURA) | 240 #if defined(TOOLKIT_GTK) |
| 246 WNDPROC default_edit_wnd_proc_; | |
| 247 static HINSTANCE instance_handle_; | |
| 248 #elif defined(TOOLKIT_GTK) | |
| 249 GtkWidget* vbox_; | 241 GtkWidget* vbox_; |
| 250 | 242 |
| 251 GtkToolItem* back_button_; | 243 GtkToolItem* back_button_; |
| 252 GtkToolItem* forward_button_; | 244 GtkToolItem* forward_button_; |
| 253 GtkToolItem* reload_button_; | 245 GtkToolItem* reload_button_; |
| 254 GtkToolItem* stop_button_; | 246 GtkToolItem* stop_button_; |
| 255 | 247 |
| 256 GtkWidget* spinner_; | 248 GtkWidget* spinner_; |
| 257 GtkToolItem* spinner_item_; | 249 GtkToolItem* spinner_item_; |
| 258 | 250 |
| (...skipping 22 matching lines...) Expand all Loading... |
| 281 static base::Callback<void(Shell*)> shell_created_callback_; | 273 static base::Callback<void(Shell*)> shell_created_callback_; |
| 282 | 274 |
| 283 // True if the destructur of Shell should post a quit closure on the current | 275 // True if the destructur of Shell should post a quit closure on the current |
| 284 // message loop if the destructed Shell object was the last one. | 276 // message loop if the destructed Shell object was the last one. |
| 285 static bool quit_message_loop_; | 277 static bool quit_message_loop_; |
| 286 }; | 278 }; |
| 287 | 279 |
| 288 } // namespace content | 280 } // namespace content |
| 289 | 281 |
| 290 #endif // CONTENT_SHELL_BROWSER_SHELL_H_ | 282 #endif // CONTENT_SHELL_BROWSER_SHELL_H_ |
| OLD | NEW |