| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_SHELL_H_ | 4 #ifndef CONTENT_SHELL_SHELL_H_ |
| 5 #define CONTENT_SHELL_SHELL_H_ | 5 #define CONTENT_SHELL_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 24 matching lines...) Expand all Loading... |
| 35 class Widget; | 35 class Widget; |
| 36 class ViewsDelegate; | 36 class ViewsDelegate; |
| 37 } | 37 } |
| 38 #endif | 38 #endif |
| 39 | 39 |
| 40 class GURL; | 40 class GURL; |
| 41 namespace content { | 41 namespace content { |
| 42 | 42 |
| 43 class BrowserContext; | 43 class BrowserContext; |
| 44 class ShellDevToolsFrontend; | 44 class ShellDevToolsFrontend; |
| 45 class ShellJavaScriptDialogCreator; | 45 class ShellJavaScriptDialogManager; |
| 46 class SiteInstance; | 46 class SiteInstance; |
| 47 class WebContents; | 47 class WebContents; |
| 48 | 48 |
| 49 // This represents one window of the Content Shell, i.e. all the UI including | 49 // This represents one window of the Content Shell, i.e. all the UI including |
| 50 // buttons and url bar, as well as the web content area. | 50 // buttons and url bar, as well as the web content area. |
| 51 class Shell : public WebContentsDelegate, | 51 class Shell : public WebContentsDelegate, |
| 52 public NotificationObserver { | 52 public NotificationObserver { |
| 53 public: | 53 public: |
| 54 virtual ~Shell(); | 54 virtual ~Shell(); |
| 55 | 55 |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 115 bool user_gesture, | 115 bool user_gesture, |
| 116 bool last_unlocked_by_target) OVERRIDE; | 116 bool last_unlocked_by_target) OVERRIDE; |
| 117 virtual void CloseContents(WebContents* source) OVERRIDE; | 117 virtual void CloseContents(WebContents* source) OVERRIDE; |
| 118 virtual bool CanOverscrollContent() const OVERRIDE; | 118 virtual bool CanOverscrollContent() const OVERRIDE; |
| 119 virtual void WebContentsCreated(WebContents* source_contents, | 119 virtual void WebContentsCreated(WebContents* source_contents, |
| 120 int64 source_frame_id, | 120 int64 source_frame_id, |
| 121 const GURL& target_url, | 121 const GURL& target_url, |
| 122 WebContents* new_contents) OVERRIDE; | 122 WebContents* new_contents) OVERRIDE; |
| 123 virtual void DidNavigateMainFramePostCommit( | 123 virtual void DidNavigateMainFramePostCommit( |
| 124 WebContents* web_contents) OVERRIDE; | 124 WebContents* web_contents) OVERRIDE; |
| 125 virtual JavaScriptDialogCreator* GetJavaScriptDialogCreator() OVERRIDE; | 125 virtual JavaScriptDialogManager* GetJavaScriptDialogManager() OVERRIDE; |
| 126 #if defined(OS_MACOSX) | 126 #if defined(OS_MACOSX) |
| 127 virtual void HandleKeyboardEvent( | 127 virtual void HandleKeyboardEvent( |
| 128 WebContents* source, | 128 WebContents* source, |
| 129 const NativeWebKeyboardEvent& event) OVERRIDE; | 129 const NativeWebKeyboardEvent& event) OVERRIDE; |
| 130 #endif | 130 #endif |
| 131 virtual bool AddMessageToConsole(WebContents* source, | 131 virtual bool AddMessageToConsole(WebContents* source, |
| 132 int32 level, | 132 int32 level, |
| 133 const string16& message, | 133 const string16& message, |
| 134 int32 line_no, | 134 int32 line_no, |
| 135 const string16& source_id) OVERRIDE; | 135 const string16& source_id) OVERRIDE; |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 200 CHROMEGTK_CALLBACK_0(Shell, gboolean, OnWindowDestroyed); | 200 CHROMEGTK_CALLBACK_0(Shell, gboolean, OnWindowDestroyed); |
| 201 | 201 |
| 202 CHROMEG_CALLBACK_3(Shell, gboolean, OnCloseWindowKeyPressed, GtkAccelGroup*, | 202 CHROMEG_CALLBACK_3(Shell, gboolean, OnCloseWindowKeyPressed, GtkAccelGroup*, |
| 203 GObject*, guint, GdkModifierType); | 203 GObject*, guint, GdkModifierType); |
| 204 CHROMEG_CALLBACK_3(Shell, gboolean, OnNewWindowKeyPressed, GtkAccelGroup*, | 204 CHROMEG_CALLBACK_3(Shell, gboolean, OnNewWindowKeyPressed, GtkAccelGroup*, |
| 205 GObject*, guint, GdkModifierType); | 205 GObject*, guint, GdkModifierType); |
| 206 CHROMEG_CALLBACK_3(Shell, gboolean, OnHighlightURLView, GtkAccelGroup*, | 206 CHROMEG_CALLBACK_3(Shell, gboolean, OnHighlightURLView, GtkAccelGroup*, |
| 207 GObject*, guint, GdkModifierType); | 207 GObject*, guint, GdkModifierType); |
| 208 #endif | 208 #endif |
| 209 | 209 |
| 210 scoped_ptr<ShellJavaScriptDialogCreator> dialog_creator_; | 210 scoped_ptr<ShellJavaScriptDialogManager> dialog_manager_; |
| 211 | 211 |
| 212 scoped_ptr<WebContents> web_contents_; | 212 scoped_ptr<WebContents> web_contents_; |
| 213 | 213 |
| 214 ShellDevToolsFrontend* devtools_frontend_; | 214 ShellDevToolsFrontend* devtools_frontend_; |
| 215 | 215 |
| 216 bool is_fullscreen_; | 216 bool is_fullscreen_; |
| 217 | 217 |
| 218 gfx::NativeWindow window_; | 218 gfx::NativeWindow window_; |
| 219 gfx::NativeEditView url_edit_view_; | 219 gfx::NativeEditView url_edit_view_; |
| 220 | 220 |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 257 static base::Callback<void(Shell*)> shell_created_callback_; | 257 static base::Callback<void(Shell*)> shell_created_callback_; |
| 258 | 258 |
| 259 // True if the destructur of Shell should post a quit closure on the current | 259 // True if the destructur of Shell should post a quit closure on the current |
| 260 // message loop if the destructed Shell object was the last one. | 260 // message loop if the destructed Shell object was the last one. |
| 261 static bool quit_message_loop_; | 261 static bool quit_message_loop_; |
| 262 }; | 262 }; |
| 263 | 263 |
| 264 } // namespace content | 264 } // namespace content |
| 265 | 265 |
| 266 #endif // CONTENT_SHELL_SHELL_H_ | 266 #endif // CONTENT_SHELL_SHELL_H_ |
| OLD | NEW |