| 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/geometry/size.h" | 18 #include "ui/gfx/geometry/size.h" |
| 19 #include "ui/gfx/native_widget_types.h" | 19 #include "ui/gfx/native_widget_types.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 #endif |
| 24 #if defined(USE_AURA) |
| 24 #if defined(OS_CHROMEOS) | 25 #if defined(OS_CHROMEOS) |
| 25 namespace gfx { | 26 namespace gfx { |
| 26 class Screen; | 27 class Screen; |
| 27 } | 28 } |
| 28 namespace wm { | 29 namespace wm { |
| 29 class WMTestHelper; | 30 class WMTestHelper; |
| 30 } | 31 } |
| 31 #endif // defined(OS_CHROMEOS) | 32 #endif // defined(OS_CHROMEOS) |
| 32 namespace views { | 33 namespace views { |
| 33 class Widget; | 34 class Widget; |
| (...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 110 WebContents* OpenURLFromTab(WebContents* source, | 111 WebContents* OpenURLFromTab(WebContents* source, |
| 111 const OpenURLParams& params) override; | 112 const OpenURLParams& params) override; |
| 112 void AddNewContents(WebContents* source, | 113 void AddNewContents(WebContents* source, |
| 113 WebContents* new_contents, | 114 WebContents* new_contents, |
| 114 WindowOpenDisposition disposition, | 115 WindowOpenDisposition disposition, |
| 115 const gfx::Rect& initial_rect, | 116 const gfx::Rect& initial_rect, |
| 116 bool user_gesture, | 117 bool user_gesture, |
| 117 bool* was_blocked) override; | 118 bool* was_blocked) override; |
| 118 void LoadingStateChanged(WebContents* source, | 119 void LoadingStateChanged(WebContents* source, |
| 119 bool to_different_document) override; | 120 bool to_different_document) override; |
| 120 #if defined(OS_ANDROID) | 121 #if defined(OS_ANDROID) && !defined(USE_AURA) |
| 121 void LoadProgressChanged(WebContents* source, double progress) override; | 122 void LoadProgressChanged(WebContents* source, double progress) override; |
| 122 #endif | 123 #endif |
| 123 void EnterFullscreenModeForTab(WebContents* web_contents, | 124 void EnterFullscreenModeForTab(WebContents* web_contents, |
| 124 const GURL& origin) override; | 125 const GURL& origin) override; |
| 125 void ExitFullscreenModeForTab(WebContents* web_contents) override; | 126 void ExitFullscreenModeForTab(WebContents* web_contents) override; |
| 126 bool IsFullscreenForTabOrPending( | 127 bool IsFullscreenForTabOrPending( |
| 127 const WebContents* web_contents) const override; | 128 const WebContents* web_contents) const override; |
| 128 blink::WebDisplayMode GetDisplayMode( | 129 blink::WebDisplayMode GetDisplayMode( |
| 129 const WebContents* web_contents) const override; | 130 const WebContents* web_contents) const override; |
| 130 void RequestToLockMouse(WebContents* web_contents, | 131 void RequestToLockMouse(WebContents* web_contents, |
| (...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 221 | 222 |
| 222 bool is_fullscreen_; | 223 bool is_fullscreen_; |
| 223 | 224 |
| 224 gfx::NativeWindow window_; | 225 gfx::NativeWindow window_; |
| 225 gfx::NativeEditView url_edit_view_; | 226 gfx::NativeEditView url_edit_view_; |
| 226 | 227 |
| 227 gfx::Size content_size_; | 228 gfx::Size content_size_; |
| 228 | 229 |
| 229 #if defined(OS_ANDROID) | 230 #if defined(OS_ANDROID) |
| 230 base::android::ScopedJavaGlobalRef<jobject> java_object_; | 231 base::android::ScopedJavaGlobalRef<jobject> java_object_; |
| 231 #elif defined(USE_AURA) | 232 #endif |
| 233 #if defined(USE_AURA) |
| 232 #if defined(OS_CHROMEOS) | 234 #if defined(OS_CHROMEOS) |
| 233 static wm::WMTestHelper* wm_test_helper_; | 235 static wm::WMTestHelper* wm_test_helper_; |
| 234 static gfx::Screen* test_screen_; | 236 static gfx::Screen* test_screen_; |
| 235 #endif | 237 #endif |
| 236 #if defined(TOOLKIT_VIEWS) | 238 #if defined(TOOLKIT_VIEWS) |
| 237 static views::ViewsDelegate* views_delegate_; | 239 static views::ViewsDelegate* views_delegate_; |
| 238 | 240 |
| 239 views::Widget* window_widget_; | 241 views::Widget* window_widget_; |
| 240 #endif // defined(TOOLKIT_VIEWS) | 242 #endif // defined(TOOLKIT_VIEWS) |
| 241 static ShellPlatformDataAura* platform_; | 243 static ShellPlatformDataAura* platform_; |
| 242 #endif // defined(USE_AURA) | 244 #endif // defined(USE_AURA) |
| 243 | 245 |
| 244 bool headless_; | 246 bool headless_; |
| 245 | 247 |
| 246 // A container of all the open windows. We use a vector so we can keep track | 248 // A container of all the open windows. We use a vector so we can keep track |
| 247 // of ordering. | 249 // of ordering. |
| 248 static std::vector<Shell*> windows_; | 250 static std::vector<Shell*> windows_; |
| 249 | 251 |
| 250 static base::Callback<void(Shell*)> shell_created_callback_; | 252 static base::Callback<void(Shell*)> shell_created_callback_; |
| 251 | 253 |
| 252 // True if the destructur of Shell should post a quit closure on the current | 254 // True if the destructur of Shell should post a quit closure on the current |
| 253 // message loop if the destructed Shell object was the last one. | 255 // message loop if the destructed Shell object was the last one. |
| 254 static bool quit_message_loop_; | 256 static bool quit_message_loop_; |
| 255 }; | 257 }; |
| 256 | 258 |
| 257 } // namespace content | 259 } // namespace content |
| 258 | 260 |
| 259 #endif // CONTENT_SHELL_BROWSER_SHELL_H_ | 261 #endif // CONTENT_SHELL_BROWSER_SHELL_H_ |
| OLD | NEW |