Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(128)

Side by Side Diff: content/shell/shell.h

Issue 14651029: content: Remove usage of NOTIFICATION_WEB_CONTENTS_DESTROYED from content (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix typo, rebase Created 7 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « content/browser/web_contents/web_contents_impl.cc ('k') | content/shell/shell.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
143 virtual void ActivateContents(WebContents* contents) OVERRIDE; 143 virtual void ActivateContents(WebContents* contents) OVERRIDE;
144 virtual void DeactivateContents(WebContents* contents) OVERRIDE; 144 virtual void DeactivateContents(WebContents* contents) OVERRIDE;
145 145
146 private: 146 private:
147 enum UIControl { 147 enum UIControl {
148 BACK_BUTTON, 148 BACK_BUTTON,
149 FORWARD_BUTTON, 149 FORWARD_BUTTON,
150 STOP_BUTTON 150 STOP_BUTTON
151 }; 151 };
152 152
153 class DevToolsWebContentsObserver;
154
153 explicit Shell(WebContents* web_contents); 155 explicit Shell(WebContents* web_contents);
154 156
155 // Helper to create a new Shell given a newly created WebContents. 157 // Helper to create a new Shell given a newly created WebContents.
156 static Shell* CreateShell(WebContents* web_contents, 158 static Shell* CreateShell(WebContents* web_contents,
157 const gfx::Size& initial_size); 159 const gfx::Size& initial_size);
158 160
159 // Helper for one time initialization of application 161 // Helper for one time initialization of application
160 static void PlatformInitialize(const gfx::Size& default_window_size); 162 static void PlatformInitialize(const gfx::Size& default_window_size);
161 163
162 // All the methods that begin with Platform need to be implemented by the 164 // All the methods that begin with Platform need to be implemented by the
(...skipping 21 matching lines...) Expand all
184 const WebContents* web_contents) const; 186 const WebContents* web_contents) const;
185 #endif 187 #endif
186 188
187 gfx::NativeView GetContentView(); 189 gfx::NativeView GetContentView();
188 190
189 // NotificationObserver 191 // NotificationObserver
190 virtual void Observe(int type, 192 virtual void Observe(int type,
191 const NotificationSource& source, 193 const NotificationSource& source,
192 const NotificationDetails& details) OVERRIDE; 194 const NotificationDetails& details) OVERRIDE;
193 195
196 void OnDevToolsWebContentsDestroyed();
197
194 #if defined(OS_WIN) && !defined(USE_AURA) 198 #if defined(OS_WIN) && !defined(USE_AURA)
195 static ATOM RegisterWindowClass(); 199 static ATOM RegisterWindowClass();
196 static LRESULT CALLBACK WndProc(HWND, UINT, WPARAM, LPARAM); 200 static LRESULT CALLBACK WndProc(HWND, UINT, WPARAM, LPARAM);
197 static LRESULT CALLBACK EditWndProc(HWND, UINT, WPARAM, LPARAM); 201 static LRESULT CALLBACK EditWndProc(HWND, UINT, WPARAM, LPARAM);
198 #elif defined(TOOLKIT_GTK) 202 #elif defined(TOOLKIT_GTK)
199 CHROMEGTK_CALLBACK_0(Shell, void, OnBackButtonClicked); 203 CHROMEGTK_CALLBACK_0(Shell, void, OnBackButtonClicked);
200 CHROMEGTK_CALLBACK_0(Shell, void, OnForwardButtonClicked); 204 CHROMEGTK_CALLBACK_0(Shell, void, OnForwardButtonClicked);
201 CHROMEGTK_CALLBACK_0(Shell, void, OnReloadButtonClicked); 205 CHROMEGTK_CALLBACK_0(Shell, void, OnReloadButtonClicked);
202 CHROMEGTK_CALLBACK_0(Shell, void, OnStopButtonClicked); 206 CHROMEGTK_CALLBACK_0(Shell, void, OnStopButtonClicked);
203 CHROMEGTK_CALLBACK_0(Shell, void, OnURLEntryActivate); 207 CHROMEGTK_CALLBACK_0(Shell, void, OnURLEntryActivate);
204 CHROMEGTK_CALLBACK_0(Shell, gboolean, OnWindowDestroyed); 208 CHROMEGTK_CALLBACK_0(Shell, gboolean, OnWindowDestroyed);
205 209
206 CHROMEG_CALLBACK_3(Shell, gboolean, OnCloseWindowKeyPressed, GtkAccelGroup*, 210 CHROMEG_CALLBACK_3(Shell, gboolean, OnCloseWindowKeyPressed, GtkAccelGroup*,
207 GObject*, guint, GdkModifierType); 211 GObject*, guint, GdkModifierType);
208 CHROMEG_CALLBACK_3(Shell, gboolean, OnNewWindowKeyPressed, GtkAccelGroup*, 212 CHROMEG_CALLBACK_3(Shell, gboolean, OnNewWindowKeyPressed, GtkAccelGroup*,
209 GObject*, guint, GdkModifierType); 213 GObject*, guint, GdkModifierType);
210 CHROMEG_CALLBACK_3(Shell, gboolean, OnHighlightURLView, GtkAccelGroup*, 214 CHROMEG_CALLBACK_3(Shell, gboolean, OnHighlightURLView, GtkAccelGroup*,
211 GObject*, guint, GdkModifierType); 215 GObject*, guint, GdkModifierType);
212 CHROMEG_CALLBACK_3(Shell, gboolean, OnReloadKeyPressed, GtkAccelGroup*, 216 CHROMEG_CALLBACK_3(Shell, gboolean, OnReloadKeyPressed, GtkAccelGroup*,
213 GObject*, guint, GdkModifierType); 217 GObject*, guint, GdkModifierType);
214 #endif 218 #endif
215 219
216 scoped_ptr<ShellJavaScriptDialogManager> dialog_manager_; 220 scoped_ptr<ShellJavaScriptDialogManager> dialog_manager_;
217 221
218 scoped_ptr<WebContents> web_contents_; 222 scoped_ptr<WebContents> web_contents_;
219 223
224 scoped_ptr<DevToolsWebContentsObserver> devtools_observer_;
220 ShellDevToolsFrontend* devtools_frontend_; 225 ShellDevToolsFrontend* devtools_frontend_;
221 226
222 bool is_fullscreen_; 227 bool is_fullscreen_;
223 228
224 gfx::NativeWindow window_; 229 gfx::NativeWindow window_;
225 gfx::NativeEditView url_edit_view_; 230 gfx::NativeEditView url_edit_view_;
226 231
227 // Notification manager 232 // Notification manager
228 NotificationRegistrar registrar_; 233 NotificationRegistrar registrar_;
229 234
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
264 static base::Callback<void(Shell*)> shell_created_callback_; 269 static base::Callback<void(Shell*)> shell_created_callback_;
265 270
266 // True if the destructur of Shell should post a quit closure on the current 271 // True if the destructur of Shell should post a quit closure on the current
267 // message loop if the destructed Shell object was the last one. 272 // message loop if the destructed Shell object was the last one.
268 static bool quit_message_loop_; 273 static bool quit_message_loop_;
269 }; 274 };
270 275
271 } // namespace content 276 } // namespace content
272 277
273 #endif // CONTENT_SHELL_SHELL_H_ 278 #endif // CONTENT_SHELL_SHELL_H_
OLDNEW
« no previous file with comments | « content/browser/web_contents/web_contents_impl.cc ('k') | content/shell/shell.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698