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 | 4 |
5 #ifndef CONTENT_SHELL_RENDERER_TEST_RUNNER_WEB_TEST_DELEGATE_H_ | 5 #ifndef CONTENT_SHELL_RENDERER_TEST_RUNNER_WEB_TEST_DELEGATE_H_ |
6 #define CONTENT_SHELL_RENDERER_TEST_RUNNER_WEB_TEST_DELEGATE_H_ | 6 #define CONTENT_SHELL_RENDERER_TEST_RUNNER_WEB_TEST_DELEGATE_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
| 10 #include "base/callback_forward.h" |
10 #include "base/memory/ref_counted.h" | 11 #include "base/memory/ref_counted.h" |
11 #include "third_party/WebKit/public/platform/WebScreenOrientationType.h" | 12 #include "third_party/WebKit/public/platform/WebScreenOrientationType.h" |
12 #include "third_party/WebKit/public/platform/WebString.h" | 13 #include "third_party/WebKit/public/platform/WebString.h" |
13 #include "third_party/WebKit/public/platform/WebURL.h" | 14 #include "third_party/WebKit/public/platform/WebURL.h" |
14 #include "third_party/WebKit/public/platform/WebVector.h" | 15 #include "third_party/WebKit/public/platform/WebVector.h" |
15 | 16 |
16 #define WEBTESTRUNNER_NEW_HISTORY_CAPTURE | 17 #define WEBTESTRUNNER_NEW_HISTORY_CAPTURE |
17 | 18 |
18 namespace blink { | 19 namespace blink { |
19 class WebBatteryStatus; | 20 class WebBatteryStatus; |
20 class WebDeviceMotionData; | 21 class WebDeviceMotionData; |
21 class WebDeviceOrientationData; | 22 class WebDeviceOrientationData; |
22 class WebFrame; | 23 class WebFrame; |
23 class WebGamepad; | 24 class WebGamepad; |
24 class WebGamepads; | 25 class WebGamepads; |
25 class WebHistoryItem; | 26 class WebHistoryItem; |
26 class WebLayer; | 27 class WebLayer; |
| 28 class WebURLResponse; |
| 29 class WebView; |
27 struct WebRect; | 30 struct WebRect; |
28 struct WebSize; | 31 struct WebSize; |
29 struct WebURLError; | 32 struct WebURLError; |
30 } | 33 } |
31 | 34 |
32 namespace cc { | 35 namespace cc { |
33 class TextureLayer; | 36 class TextureLayer; |
34 class SharedBitmapManager; | 37 class SharedBitmapManager; |
35 } | 38 } |
36 | 39 |
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
194 virtual void LoadURLForFrame(const blink::WebURL& url, | 197 virtual void LoadURLForFrame(const blink::WebURL& url, |
195 const std::string& frame_name) = 0; | 198 const std::string& frame_name) = 0; |
196 | 199 |
197 // Returns true if resource requests to external URLs should be permitted. | 200 // Returns true if resource requests to external URLs should be permitted. |
198 virtual bool AllowExternalPages() = 0; | 201 virtual bool AllowExternalPages() = 0; |
199 | 202 |
200 // Returns a text dump the back/forward history for the WebView associated | 203 // Returns a text dump the back/forward history for the WebView associated |
201 // with the given WebTestProxyBase. | 204 // with the given WebTestProxyBase. |
202 virtual std::string DumpHistoryForWindow(WebTestProxyBase* proxy) = 0; | 205 virtual std::string DumpHistoryForWindow(WebTestProxyBase* proxy) = 0; |
203 | 206 |
| 207 // Fetch the manifest for a given WebView from the given url. |
| 208 virtual void FetchManifest( |
| 209 blink::WebView* view, |
| 210 const GURL& url, |
| 211 const base::Callback<void(const blink::WebURLResponse& response, |
| 212 const std::string& data)>& callback) = 0; |
| 213 |
204 // Sends a message to the LayoutTestPermissionManager in order for it to | 214 // Sends a message to the LayoutTestPermissionManager in order for it to |
205 // update its database. | 215 // update its database. |
206 virtual void SetPermission(const std::string& permission_name, | 216 virtual void SetPermission(const std::string& permission_name, |
207 const std::string& permission_value, | 217 const std::string& permission_value, |
208 const GURL& origin, | 218 const GURL& origin, |
209 const GURL& embedding_origin) = 0; | 219 const GURL& embedding_origin) = 0; |
210 | 220 |
211 // Clear all the permissions set via SetPermission(). | 221 // Clear all the permissions set via SetPermission(). |
212 virtual void ResetPermissions() = 0; | 222 virtual void ResetPermissions() = 0; |
213 | 223 |
214 // Instantiates WebLayerImpl for TestPlugin. | 224 // Instantiates WebLayerImpl for TestPlugin. |
215 virtual blink::WebLayer* InstantiateWebLayer( | 225 virtual blink::WebLayer* InstantiateWebLayer( |
216 scoped_refptr<cc::TextureLayer> layer) = 0; | 226 scoped_refptr<cc::TextureLayer> layer) = 0; |
217 | 227 |
218 virtual cc::SharedBitmapManager* GetSharedBitmapManager() = 0; | 228 virtual cc::SharedBitmapManager* GetSharedBitmapManager() = 0; |
219 }; | 229 }; |
220 | 230 |
221 } // namespace content | 231 } // namespace content |
222 | 232 |
223 #endif // CONTENT_SHELL_RENDERER_TEST_RUNNER_WEB_TEST_DELEGATE_H_ | 233 #endif // CONTENT_SHELL_RENDERER_TEST_RUNNER_WEB_TEST_DELEGATE_H_ |
OLD | NEW |