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 #include <stdint.h> | 7 #include <stdint.h> |
8 | 8 |
| 9 #include <memory> |
9 #include <vector> | 10 #include <vector> |
10 | 11 |
11 #include "base/callback_forward.h" | 12 #include "base/callback_forward.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" |
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
135 blink::WebDisplayMode GetDisplayMode( | 135 blink::WebDisplayMode GetDisplayMode( |
136 const WebContents* web_contents) const override; | 136 const WebContents* web_contents) const override; |
137 void RequestToLockMouse(WebContents* web_contents, | 137 void RequestToLockMouse(WebContents* web_contents, |
138 bool user_gesture, | 138 bool user_gesture, |
139 bool last_unlocked_by_target) override; | 139 bool last_unlocked_by_target) override; |
140 void CloseContents(WebContents* source) override; | 140 void CloseContents(WebContents* source) override; |
141 bool CanOverscrollContent() const override; | 141 bool CanOverscrollContent() const override; |
142 void DidNavigateMainFramePostCommit(WebContents* web_contents) override; | 142 void DidNavigateMainFramePostCommit(WebContents* web_contents) override; |
143 JavaScriptDialogManager* GetJavaScriptDialogManager( | 143 JavaScriptDialogManager* GetJavaScriptDialogManager( |
144 WebContents* source) override; | 144 WebContents* source) override; |
145 scoped_ptr<BluetoothChooser> RunBluetoothChooser( | 145 std::unique_ptr<BluetoothChooser> RunBluetoothChooser( |
146 RenderFrameHost* frame, | 146 RenderFrameHost* frame, |
147 const BluetoothChooser::EventHandler& event_handler) override; | 147 const BluetoothChooser::EventHandler& event_handler) override; |
148 #if defined(OS_MACOSX) | 148 #if defined(OS_MACOSX) |
149 void HandleKeyboardEvent(WebContents* source, | 149 void HandleKeyboardEvent(WebContents* source, |
150 const NativeWebKeyboardEvent& event) override; | 150 const NativeWebKeyboardEvent& event) override; |
151 #endif | 151 #endif |
152 bool AddMessageToConsole(WebContents* source, | 152 bool AddMessageToConsole(WebContents* source, |
153 int32_t level, | 153 int32_t level, |
154 const base::string16& message, | 154 const base::string16& message, |
155 int32_t line_no, | 155 int32_t line_no, |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
221 | 221 |
222 void ToggleFullscreenModeForTab(WebContents* web_contents, | 222 void ToggleFullscreenModeForTab(WebContents* web_contents, |
223 bool enter_fullscreen); | 223 bool enter_fullscreen); |
224 // WebContentsObserver | 224 // WebContentsObserver |
225 void RenderViewCreated(RenderViewHost* render_view_host) override; | 225 void RenderViewCreated(RenderViewHost* render_view_host) override; |
226 void TitleWasSet(NavigationEntry* entry, bool explicit_set) override; | 226 void TitleWasSet(NavigationEntry* entry, bool explicit_set) override; |
227 | 227 |
228 void InnerShowDevTools(); | 228 void InnerShowDevTools(); |
229 void OnDevToolsWebContentsDestroyed(); | 229 void OnDevToolsWebContentsDestroyed(); |
230 | 230 |
231 scoped_ptr<ShellJavaScriptDialogManager> dialog_manager_; | 231 std::unique_ptr<ShellJavaScriptDialogManager> dialog_manager_; |
232 | 232 |
233 scoped_ptr<WebContents> web_contents_; | 233 std::unique_ptr<WebContents> web_contents_; |
234 | 234 |
235 scoped_ptr<DevToolsWebContentsObserver> devtools_observer_; | 235 std::unique_ptr<DevToolsWebContentsObserver> devtools_observer_; |
236 ShellDevToolsFrontend* devtools_frontend_; | 236 ShellDevToolsFrontend* devtools_frontend_; |
237 | 237 |
238 bool is_fullscreen_; | 238 bool is_fullscreen_; |
239 | 239 |
240 gfx::NativeWindow window_; | 240 gfx::NativeWindow window_; |
241 #if defined(OS_MACOSX) | 241 #if defined(OS_MACOSX) |
242 NSTextField* url_edit_view_; | 242 NSTextField* url_edit_view_; |
243 #endif | 243 #endif |
244 | 244 |
245 gfx::Size content_size_; | 245 gfx::Size content_size_; |
(...skipping 22 matching lines...) Expand all Loading... |
268 static base::Callback<void(Shell*)> shell_created_callback_; | 268 static base::Callback<void(Shell*)> shell_created_callback_; |
269 | 269 |
270 // True if the destructur of Shell should post a quit closure on the current | 270 // True if the destructur of Shell should post a quit closure on the current |
271 // message loop if the destructed Shell object was the last one. | 271 // message loop if the destructed Shell object was the last one. |
272 static bool quit_message_loop_; | 272 static bool quit_message_loop_; |
273 }; | 273 }; |
274 | 274 |
275 } // namespace content | 275 } // namespace content |
276 | 276 |
277 #endif // CONTENT_SHELL_BROWSER_SHELL_H_ | 277 #endif // CONTENT_SHELL_BROWSER_SHELL_H_ |
OLD | NEW |