| OLD | NEW |
| 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 "build/build_config.h" |
| 15 #include "content/public/browser/web_contents_delegate.h" | 15 #include "content/public/browser/web_contents_delegate.h" |
| 16 #include "content/public/browser/web_contents_observer.h" | 16 #include "content/public/browser/web_contents_observer.h" |
| 17 #include "ipc/ipc_channel.h" | 17 #include "ipc/ipc_channel.h" |
| 18 #include "ui/gfx/native_widget_types.h" | 18 #include "ui/gfx/native_widget_types.h" |
| 19 #include "ui/gfx/size.h" | 19 #include "ui/gfx/size.h" |
| 20 | 20 |
| 21 #if defined(OS_ANDROID) | 21 #if defined(OS_ANDROID) |
| 22 #include "base/android/scoped_java_ref.h" | 22 #include "base/android/scoped_java_ref.h" |
| 23 #elif defined(USE_AURA) | 23 #elif defined(USE_AURA) |
| 24 #if defined(OS_CHROMEOS) | 24 #if defined(OS_CHROMEOS) |
| 25 namespace gfx { |
| 26 class Screen; |
| 27 } |
| 25 namespace wm { | 28 namespace wm { |
| 26 class WMTestHelper; | 29 class WMTestHelper; |
| 27 } | 30 } |
| 28 #endif // defined(OS_CHROMEOS) | 31 #endif // defined(OS_CHROMEOS) |
| 29 namespace views { | 32 namespace views { |
| 30 class Widget; | 33 class Widget; |
| 31 class ViewsDelegate; | 34 class ViewsDelegate; |
| 32 } | 35 } |
| 33 #endif // defined(USE_AURA) | 36 #endif // defined(USE_AURA) |
| 34 | 37 |
| (...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 229 gfx::NativeWindow window_; | 232 gfx::NativeWindow window_; |
| 230 gfx::NativeEditView url_edit_view_; | 233 gfx::NativeEditView url_edit_view_; |
| 231 | 234 |
| 232 gfx::Size content_size_; | 235 gfx::Size content_size_; |
| 233 | 236 |
| 234 #if defined(OS_ANDROID) | 237 #if defined(OS_ANDROID) |
| 235 base::android::ScopedJavaGlobalRef<jobject> java_object_; | 238 base::android::ScopedJavaGlobalRef<jobject> java_object_; |
| 236 #elif defined(USE_AURA) | 239 #elif defined(USE_AURA) |
| 237 #if defined(OS_CHROMEOS) | 240 #if defined(OS_CHROMEOS) |
| 238 static wm::WMTestHelper* wm_test_helper_; | 241 static wm::WMTestHelper* wm_test_helper_; |
| 242 static gfx::Screen* test_screen_; |
| 239 #endif | 243 #endif |
| 240 #if defined(TOOLKIT_VIEWS) | 244 #if defined(TOOLKIT_VIEWS) |
| 241 static views::ViewsDelegate* views_delegate_; | 245 static views::ViewsDelegate* views_delegate_; |
| 242 | 246 |
| 243 views::Widget* window_widget_; | 247 views::Widget* window_widget_; |
| 244 #endif // defined(TOOLKIT_VIEWS) | 248 #endif // defined(TOOLKIT_VIEWS) |
| 245 static ShellPlatformDataAura* platform_; | 249 static ShellPlatformDataAura* platform_; |
| 246 #endif // defined(USE_AURA) | 250 #endif // defined(USE_AURA) |
| 247 | 251 |
| 248 bool headless_; | 252 bool headless_; |
| 249 | 253 |
| 250 // A container of all the open windows. We use a vector so we can keep track | 254 // A container of all the open windows. We use a vector so we can keep track |
| 251 // of ordering. | 255 // of ordering. |
| 252 static std::vector<Shell*> windows_; | 256 static std::vector<Shell*> windows_; |
| 253 | 257 |
| 254 static base::Callback<void(Shell*)> shell_created_callback_; | 258 static base::Callback<void(Shell*)> shell_created_callback_; |
| 255 | 259 |
| 256 // True if the destructur of Shell should post a quit closure on the current | 260 // True if the destructur of Shell should post a quit closure on the current |
| 257 // message loop if the destructed Shell object was the last one. | 261 // message loop if the destructed Shell object was the last one. |
| 258 static bool quit_message_loop_; | 262 static bool quit_message_loop_; |
| 259 }; | 263 }; |
| 260 | 264 |
| 261 } // namespace content | 265 } // namespace content |
| 262 | 266 |
| 263 #endif // CONTENT_SHELL_BROWSER_SHELL_H_ | 267 #endif // CONTENT_SHELL_BROWSER_SHELL_H_ |
| OLD | NEW |