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" |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
58 static const int kDefaultTestWindowWidthDip; | 58 static const int kDefaultTestWindowWidthDip; |
59 static const int kDefaultTestWindowHeightDip; | 59 static const int kDefaultTestWindowHeightDip; |
60 | 60 |
61 virtual ~Shell(); | 61 virtual ~Shell(); |
62 | 62 |
63 void LoadURL(const GURL& url); | 63 void LoadURL(const GURL& url); |
64 void LoadURLForFrame(const GURL& url, const std::string& frame_name); | 64 void LoadURLForFrame(const GURL& url, const std::string& frame_name); |
65 void GoBackOrForward(int offset); | 65 void GoBackOrForward(int offset); |
66 void Reload(); | 66 void Reload(); |
67 void Stop(); | 67 void Stop(); |
68 void UpdateNavigationControls(); | 68 void UpdateNavigationControls(bool to_different_document); |
69 void Close(); | 69 void Close(); |
70 void ShowDevTools(); | 70 void ShowDevTools(); |
71 void ShowDevToolsForElementAt(int x, int y); | 71 void ShowDevToolsForElementAt(int x, int y); |
72 void ShowDevToolsForTest(const std::string& settings); | 72 void ShowDevToolsForTest(const std::string& settings); |
73 void CloseDevTools(); | 73 void CloseDevTools(); |
74 #if defined(TOOLKIT_GTK) || defined(OS_MACOSX) | 74 #if defined(TOOLKIT_GTK) || defined(OS_MACOSX) |
75 // Resizes the web content view to the given dimensions. | 75 // Resizes the web content view to the given dimensions. |
76 void SizeTo(const gfx::Size& content_size); | 76 void SizeTo(const gfx::Size& content_size); |
77 #endif | 77 #endif |
78 | 78 |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
112 | 112 |
113 // WebContentsDelegate | 113 // WebContentsDelegate |
114 virtual WebContents* OpenURLFromTab(WebContents* source, | 114 virtual WebContents* OpenURLFromTab(WebContents* source, |
115 const OpenURLParams& params) OVERRIDE; | 115 const OpenURLParams& params) OVERRIDE; |
116 virtual void AddNewContents(WebContents* source, | 116 virtual void AddNewContents(WebContents* source, |
117 WebContents* new_contents, | 117 WebContents* new_contents, |
118 WindowOpenDisposition disposition, | 118 WindowOpenDisposition disposition, |
119 const gfx::Rect& initial_pos, | 119 const gfx::Rect& initial_pos, |
120 bool user_gesture, | 120 bool user_gesture, |
121 bool* was_blocked) OVERRIDE; | 121 bool* was_blocked) OVERRIDE; |
122 virtual void LoadingStateChanged(WebContents* source) OVERRIDE; | 122 virtual void LoadingStateChanged(WebContents* source, |
| 123 bool to_different_document) OVERRIDE; |
123 #if defined(OS_ANDROID) | 124 #if defined(OS_ANDROID) |
124 virtual void LoadProgressChanged(WebContents* source, | 125 virtual void LoadProgressChanged(WebContents* source, |
125 double progress) OVERRIDE; | 126 double progress) OVERRIDE; |
126 #endif | 127 #endif |
127 virtual void ToggleFullscreenModeForTab(WebContents* web_contents, | 128 virtual void ToggleFullscreenModeForTab(WebContents* web_contents, |
128 bool enter_fullscreen) OVERRIDE; | 129 bool enter_fullscreen) OVERRIDE; |
129 virtual bool IsFullscreenForTabOrPending( | 130 virtual bool IsFullscreenForTabOrPending( |
130 const WebContents* web_contents) const OVERRIDE; | 131 const WebContents* web_contents) const OVERRIDE; |
131 virtual void RequestToLockMouse(WebContents* web_contents, | 132 virtual void RequestToLockMouse(WebContents* web_contents, |
132 bool user_gesture, | 133 bool user_gesture, |
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
283 static base::Callback<void(Shell*)> shell_created_callback_; | 284 static base::Callback<void(Shell*)> shell_created_callback_; |
284 | 285 |
285 // True if the destructur of Shell should post a quit closure on the current | 286 // True if the destructur of Shell should post a quit closure on the current |
286 // message loop if the destructed Shell object was the last one. | 287 // message loop if the destructed Shell object was the last one. |
287 static bool quit_message_loop_; | 288 static bool quit_message_loop_; |
288 }; | 289 }; |
289 | 290 |
290 } // namespace content | 291 } // namespace content |
291 | 292 |
292 #endif // CONTENT_SHELL_BROWSER_SHELL_H_ | 293 #endif // CONTENT_SHELL_BROWSER_SHELL_H_ |
OLD | NEW |