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

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

Issue 26695007: aura: Allow creating content_shell without views. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: unrevert Created 7 years, 2 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/shell/DEPS ('k') | content/shell/browser/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 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"
11 #include "base/callback_forward.h" 11 #include "base/callback_forward.h"
12 #include "base/memory/scoped_ptr.h" 12 #include "base/memory/scoped_ptr.h"
13 #include "base/strings/string_piece.h" 13 #include "base/strings/string_piece.h"
14 #include "build/build_config.h"
14 #include "content/public/browser/web_contents_delegate.h" 15 #include "content/public/browser/web_contents_delegate.h"
15 #include "content/public/browser/web_contents_observer.h" 16 #include "content/public/browser/web_contents_observer.h"
16 #include "ipc/ipc_channel.h" 17 #include "ipc/ipc_channel.h"
17 #include "ui/gfx/native_widget_types.h" 18 #include "ui/gfx/native_widget_types.h"
18 #include "ui/gfx/size.h" 19 #include "ui/gfx/size.h"
19 20
20 #if defined(TOOLKIT_GTK) 21 #if defined(TOOLKIT_GTK)
21 #include <gtk/gtk.h> 22 #include <gtk/gtk.h>
22 #include "ui/base/gtk/gtk_signal.h" 23 #include "ui/base/gtk/gtk_signal.h"
23 24
24 typedef struct _GtkToolItem GtkToolItem; 25 typedef struct _GtkToolItem GtkToolItem;
25 #elif defined(OS_ANDROID) 26 #elif defined(OS_ANDROID)
26 #include "base/android/scoped_java_ref.h" 27 #include "base/android/scoped_java_ref.h"
27 #elif defined(USE_AURA) 28 #elif defined(USE_AURA)
28 #if defined(OS_CHROMEOS) 29 #if defined(OS_CHROMEOS)
29 namespace shell { 30 namespace shell {
30 class MinimalShell; 31 class MinimalShell;
31 } // namespace shell 32 } // namespace shell
32 #endif // defined(OS_CHROMEOS) 33 #endif // defined(OS_CHROMEOS)
33 namespace views { 34 namespace views {
34 class Widget; 35 class Widget;
35 class ViewsDelegate; 36 class ViewsDelegate;
36 } // namespace views 37 } // namespace views
37 #endif // defined(USE_AURA) 38 #endif // defined(USE_AURA)
38 39
39 class GURL; 40 class GURL;
40 namespace content { 41 namespace content {
41 42
43 #if defined(USE_AURA)
44 class ShellAuraPlatformData;
45 #endif
46
42 class BrowserContext; 47 class BrowserContext;
43 class ShellDevToolsFrontend; 48 class ShellDevToolsFrontend;
44 class ShellJavaScriptDialogManager; 49 class ShellJavaScriptDialogManager;
45 class SiteInstance; 50 class SiteInstance;
46 class WebContents; 51 class WebContents;
47 52
48 // This represents one window of the Content Shell, i.e. all the UI including 53 // This represents one window of the Content Shell, i.e. all the UI including
49 // buttons and url bar, as well as the web content area. 54 // buttons and url bar, as well as the web content area.
50 class Shell : public WebContentsDelegate, 55 class Shell : public WebContentsDelegate,
51 public WebContentsObserver { 56 public WebContentsObserver {
(...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after
252 257
253 int content_width_; 258 int content_width_;
254 int content_height_; 259 int content_height_;
255 int ui_elements_height_; // height of menubar, toolbar, etc. 260 int ui_elements_height_; // height of menubar, toolbar, etc.
256 #elif defined(OS_ANDROID) 261 #elif defined(OS_ANDROID)
257 base::android::ScopedJavaGlobalRef<jobject> java_object_; 262 base::android::ScopedJavaGlobalRef<jobject> java_object_;
258 #elif defined(USE_AURA) 263 #elif defined(USE_AURA)
259 #if defined(OS_CHROMEOS) 264 #if defined(OS_CHROMEOS)
260 static shell::MinimalShell* minimal_shell_; 265 static shell::MinimalShell* minimal_shell_;
261 #endif 266 #endif
267 #if defined(TOOLKIT_VIEWS)
262 static views::ViewsDelegate* views_delegate_; 268 static views::ViewsDelegate* views_delegate_;
263 269
264 views::Widget* window_widget_; 270 views::Widget* window_widget_;
271 #else // defined(TOOLKIT_VIEWS)
272 scoped_ptr<ShellAuraPlatformData> platform_;
273 #endif // defined(TOOLKIT_VIEWS)
265 #elif defined(OS_MACOSX) 274 #elif defined(OS_MACOSX)
266 int content_width_; 275 int content_width_;
267 int content_height_; 276 int content_height_;
268 #endif 277 #endif
269 278
270 bool headless_; 279 bool headless_;
271 280
272 // A container of all the open windows. We use a vector so we can keep track 281 // A container of all the open windows. We use a vector so we can keep track
273 // of ordering. 282 // of ordering.
274 static std::vector<Shell*> windows_; 283 static std::vector<Shell*> windows_;
275 284
276 static base::Callback<void(Shell*)> shell_created_callback_; 285 static base::Callback<void(Shell*)> shell_created_callback_;
277 286
278 // True if the destructur of Shell should post a quit closure on the current 287 // True if the destructur of Shell should post a quit closure on the current
279 // message loop if the destructed Shell object was the last one. 288 // message loop if the destructed Shell object was the last one.
280 static bool quit_message_loop_; 289 static bool quit_message_loop_;
281 }; 290 };
282 291
283 } // namespace content 292 } // namespace content
284 293
285 #endif // CONTENT_SHELL_BROWSER_SHELL_H_ 294 #endif // CONTENT_SHELL_BROWSER_SHELL_H_
OLDNEW
« no previous file with comments | « content/shell/DEPS ('k') | content/shell/browser/shell.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698