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

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: 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
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 "content/public/browser/web_contents_delegate.h" 14 #include "content/public/browser/web_contents_delegate.h"
15 #include "content/public/browser/web_contents_observer.h" 15 #include "content/public/browser/web_contents_observer.h"
16 #include "ipc/ipc_channel.h" 16 #include "ipc/ipc_channel.h"
17 #include "ui/gfx/native_widget_types.h" 17 #include "ui/gfx/native_widget_types.h"
18 #include "ui/gfx/size.h" 18 #include "ui/gfx/size.h"
19 19
20 #if defined(TOOLKIT_GTK) 20 #if defined(TOOLKIT_GTK)
21 #include <gtk/gtk.h> 21 #include <gtk/gtk.h>
22 #include "ui/base/gtk/gtk_signal.h" 22 #include "ui/base/gtk/gtk_signal.h"
23 23
24 typedef struct _GtkToolItem GtkToolItem; 24 typedef struct _GtkToolItem GtkToolItem;
25 #elif defined(OS_ANDROID) 25 #elif defined(OS_ANDROID)
26 #include "base/android/scoped_java_ref.h" 26 #include "base/android/scoped_java_ref.h"
27 #elif defined(USE_AURA) 27 #elif defined(USE_AURA)
28 namespace aura {
29 class RootWindow;
30 }
28 #if defined(OS_CHROMEOS) 31 #if defined(OS_CHROMEOS)
29 namespace shell { 32 namespace shell {
30 class MinimalShell; 33 class MinimalShell;
31 } // namespace shell 34 } // namespace shell
32 #endif // defined(OS_CHROMEOS) 35 #endif // defined(OS_CHROMEOS)
33 namespace views { 36 namespace views {
34 class Widget; 37 class Widget;
35 class ViewsDelegate; 38 class ViewsDelegate;
36 } // namespace views 39 } // namespace views
37 #endif // defined(USE_AURA) 40 #endif // defined(USE_AURA)
(...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after
252 255
253 int content_width_; 256 int content_width_;
254 int content_height_; 257 int content_height_;
255 int ui_elements_height_; // height of menubar, toolbar, etc. 258 int ui_elements_height_; // height of menubar, toolbar, etc.
256 #elif defined(OS_ANDROID) 259 #elif defined(OS_ANDROID)
257 base::android::ScopedJavaGlobalRef<jobject> java_object_; 260 base::android::ScopedJavaGlobalRef<jobject> java_object_;
258 #elif defined(USE_AURA) 261 #elif defined(USE_AURA)
259 #if defined(OS_CHROMEOS) 262 #if defined(OS_CHROMEOS)
260 static shell::MinimalShell* minimal_shell_; 263 static shell::MinimalShell* minimal_shell_;
261 #endif 264 #endif
265 #if defined(TOOLKIT_VIEWS)
262 static views::ViewsDelegate* views_delegate_; 266 static views::ViewsDelegate* views_delegate_;
263 267
264 views::Widget* window_widget_; 268 views::Widget* window_widget_;
269 #else // defined(TOOLKIT_VIEWS)
270 static scoped_ptr<aura::RootWindow> root_window_;
Daniel Erat 2013/10/17 14:41:19 should this be a regular pointer instead?
271 #endif // defined(TOOLKIT_VIEWS)
265 #elif defined(OS_MACOSX) 272 #elif defined(OS_MACOSX)
266 int content_width_; 273 int content_width_;
267 int content_height_; 274 int content_height_;
268 #endif 275 #endif
269 276
270 bool headless_; 277 bool headless_;
271 278
272 // A container of all the open windows. We use a vector so we can keep track 279 // A container of all the open windows. We use a vector so we can keep track
273 // of ordering. 280 // of ordering.
274 static std::vector<Shell*> windows_; 281 static std::vector<Shell*> windows_;
275 282
276 static base::Callback<void(Shell*)> shell_created_callback_; 283 static base::Callback<void(Shell*)> shell_created_callback_;
277 284
278 // True if the destructur of Shell should post a quit closure on the current 285 // 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. 286 // message loop if the destructed Shell object was the last one.
280 static bool quit_message_loop_; 287 static bool quit_message_loop_;
281 }; 288 };
282 289
283 } // namespace content 290 } // namespace content
284 291
285 #endif // CONTENT_SHELL_BROWSER_SHELL_H_ 292 #endif // CONTENT_SHELL_BROWSER_SHELL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698