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 | 4 |
5 #ifndef CONTENT_SHELL_SHELL_H_ | 5 #ifndef CONTENT_SHELL_SHELL_H_ |
6 #define CONTENT_SHELL_SHELL_H_ | 6 #define CONTENT_SHELL_SHELL_H_ |
7 | 7 |
8 | 8 |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 14 matching lines...) Expand all Loading... |
25 | 25 |
26 typedef struct _GtkToolItem GtkToolItem; | 26 typedef struct _GtkToolItem GtkToolItem; |
27 #elif defined(OS_ANDROID) | 27 #elif defined(OS_ANDROID) |
28 #include "base/android/scoped_java_ref.h" | 28 #include "base/android/scoped_java_ref.h" |
29 #elif defined(USE_AURA) | 29 #elif defined(USE_AURA) |
30 namespace views { | 30 namespace views { |
31 class Widget; | 31 class Widget; |
32 class ViewsDelegate; | 32 class ViewsDelegate; |
33 } | 33 } |
34 namespace aura { | 34 namespace aura { |
| 35 class RootWindow; |
35 namespace client { | 36 namespace client { |
36 class StackingClient; | 37 class StackingClient; |
37 } | 38 } |
38 } | 39 } |
39 #endif | 40 #endif |
40 | 41 |
41 class GURL; | 42 class GURL; |
| 43 |
42 namespace content { | 44 namespace content { |
43 | 45 |
| 46 // Content area size for newly created windows. |
| 47 static const int kTestWindowWidth = 800; |
| 48 static const int kTestWindowHeight = 600; |
| 49 |
44 class BrowserContext; | 50 class BrowserContext; |
45 class ShellJavaScriptDialogCreator; | 51 class ShellJavaScriptDialogCreator; |
46 class SiteInstance; | 52 class SiteInstance; |
47 class WebContents; | 53 class WebContents; |
48 | 54 |
49 // This represents one window of the Content Shell, i.e. all the UI including | 55 // 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. | 56 // buttons and url bar, as well as the web content area. |
51 class Shell : public WebContentsDelegate, | 57 class Shell : public WebContentsDelegate, |
52 public NotificationObserver { | 58 public NotificationObserver { |
53 public: | 59 public: |
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
196 CHROMEGTK_CALLBACK_0(Shell, void, OnURLEntryActivate); | 202 CHROMEGTK_CALLBACK_0(Shell, void, OnURLEntryActivate); |
197 CHROMEGTK_CALLBACK_0(Shell, gboolean, OnWindowDestroyed); | 203 CHROMEGTK_CALLBACK_0(Shell, gboolean, OnWindowDestroyed); |
198 | 204 |
199 CHROMEG_CALLBACK_3(Shell, gboolean, OnCloseWindowKeyPressed, GtkAccelGroup*, | 205 CHROMEG_CALLBACK_3(Shell, gboolean, OnCloseWindowKeyPressed, GtkAccelGroup*, |
200 GObject*, guint, GdkModifierType); | 206 GObject*, guint, GdkModifierType); |
201 CHROMEG_CALLBACK_3(Shell, gboolean, OnNewWindowKeyPressed, GtkAccelGroup*, | 207 CHROMEG_CALLBACK_3(Shell, gboolean, OnNewWindowKeyPressed, GtkAccelGroup*, |
202 GObject*, guint, GdkModifierType); | 208 GObject*, guint, GdkModifierType); |
203 CHROMEG_CALLBACK_3(Shell, gboolean, OnHighlightURLView, GtkAccelGroup*, | 209 CHROMEG_CALLBACK_3(Shell, gboolean, OnHighlightURLView, GtkAccelGroup*, |
204 GObject*, guint, GdkModifierType); | 210 GObject*, guint, GdkModifierType); |
205 #endif | 211 #endif |
| 212 #if defined(USE_AURA) |
| 213 static scoped_ptr<aura::RootWindow> CreateRootWindow(int width, |
| 214 int height); |
| 215 #endif |
206 | 216 |
207 scoped_ptr<ShellJavaScriptDialogCreator> dialog_creator_; | 217 scoped_ptr<ShellJavaScriptDialogCreator> dialog_creator_; |
208 | 218 |
209 scoped_ptr<WebContents> web_contents_; | 219 scoped_ptr<WebContents> web_contents_; |
210 | 220 |
211 Shell* dev_tools_; | 221 Shell* dev_tools_; |
212 | 222 |
213 bool is_fullscreen_; | 223 bool is_fullscreen_; |
214 | 224 |
215 gfx::NativeWindow window_; | 225 gfx::NativeWindow window_; |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
252 static base::Callback<void(Shell*)> shell_created_callback_; | 262 static base::Callback<void(Shell*)> shell_created_callback_; |
253 | 263 |
254 // True if the destructur of Shell should post a quit closure on the current | 264 // True if the destructur of Shell should post a quit closure on the current |
255 // message loop if the destructed Shell object was the last one. | 265 // message loop if the destructed Shell object was the last one. |
256 static bool quit_message_loop_; | 266 static bool quit_message_loop_; |
257 }; | 267 }; |
258 | 268 |
259 } // namespace content | 269 } // namespace content |
260 | 270 |
261 #endif // CONTENT_SHELL_SHELL_H_ | 271 #endif // CONTENT_SHELL_SHELL_H_ |
OLD | NEW |