OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 COMPONENTS_TEST_RUNNER_WEB_TEST_PROXY_H_ | 5 #ifndef COMPONENTS_TEST_RUNNER_WEB_TEST_PROXY_H_ |
6 #define COMPONENTS_TEST_RUNNER_WEB_TEST_PROXY_H_ | 6 #define COMPONENTS_TEST_RUNNER_WEB_TEST_PROXY_H_ |
7 | 7 |
8 #include <deque> | 8 #include <deque> |
9 #include <map> | 9 #include <map> |
10 #include <string> | 10 #include <string> |
11 | 11 |
12 #include "base/basictypes.h" | 12 #include "base/basictypes.h" |
13 #include "base/callback.h" | 13 #include "base/callback.h" |
14 #include "base/memory/scoped_ptr.h" | 14 #include "base/memory/scoped_ptr.h" |
| 15 #include "components/test_runner/test_runner_export.h" |
15 #include "components/test_runner/web_task.h" | 16 #include "components/test_runner/web_task.h" |
16 #include "third_party/WebKit/public/platform/WebImage.h" | 17 #include "third_party/WebKit/public/platform/WebImage.h" |
17 #include "third_party/WebKit/public/platform/WebRect.h" | 18 #include "third_party/WebKit/public/platform/WebRect.h" |
18 #include "third_party/WebKit/public/platform/WebScreenInfo.h" | 19 #include "third_party/WebKit/public/platform/WebScreenInfo.h" |
19 #include "third_party/WebKit/public/platform/WebURLError.h" | 20 #include "third_party/WebKit/public/platform/WebURLError.h" |
20 #include "third_party/WebKit/public/platform/WebURLRequest.h" | 21 #include "third_party/WebKit/public/platform/WebURLRequest.h" |
21 #include "third_party/WebKit/public/web/WebAXEnums.h" | 22 #include "third_party/WebKit/public/web/WebAXEnums.h" |
22 #include "third_party/WebKit/public/web/WebDOMMessageEvent.h" | 23 #include "third_party/WebKit/public/web/WebDOMMessageEvent.h" |
23 #include "third_party/WebKit/public/web/WebDataSource.h" | 24 #include "third_party/WebKit/public/web/WebDataSource.h" |
24 #include "third_party/WebKit/public/web/WebDragOperation.h" | 25 #include "third_party/WebKit/public/web/WebDragOperation.h" |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
81 class SpellCheckClient; | 82 class SpellCheckClient; |
82 class TestInterfaces; | 83 class TestInterfaces; |
83 class WebTestDelegate; | 84 class WebTestDelegate; |
84 class WebTestInterfaces; | 85 class WebTestInterfaces; |
85 | 86 |
86 // WebTestProxyBase is the "brain" of WebTestProxy in the sense that | 87 // WebTestProxyBase is the "brain" of WebTestProxy in the sense that |
87 // WebTestProxy does the bridge between RenderViewImpl and WebTestProxyBase and | 88 // WebTestProxy does the bridge between RenderViewImpl and WebTestProxyBase and |
88 // when it requires a behavior to be different from the usual, it will call | 89 // when it requires a behavior to be different from the usual, it will call |
89 // WebTestProxyBase that implements the expected behavior. | 90 // WebTestProxyBase that implements the expected behavior. |
90 // See WebTestProxy class comments for more information. | 91 // See WebTestProxy class comments for more information. |
91 class WebTestProxyBase { | 92 class TEST_RUNNER_EXPORT WebTestProxyBase { |
92 public: | 93 public: |
93 void SetInterfaces(WebTestInterfaces* interfaces); | 94 void SetInterfaces(WebTestInterfaces* interfaces); |
| 95 WebTestInterfaces* GetInterfaces(); |
94 void SetDelegate(WebTestDelegate* delegate); | 96 void SetDelegate(WebTestDelegate* delegate); |
| 97 WebTestDelegate* GetDelegate(); |
95 void set_widget(blink::WebWidget* widget) { web_widget_ = widget; } | 98 void set_widget(blink::WebWidget* widget) { web_widget_ = widget; } |
96 | 99 |
97 void Reset(); | 100 void Reset(); |
98 | 101 |
99 blink::WebSpellCheckClient* GetSpellCheckClient() const; | 102 blink::WebSpellCheckClient* GetSpellCheckClient() const; |
100 blink::WebColorChooser* CreateColorChooser( | 103 blink::WebColorChooser* CreateColorChooser( |
101 blink::WebColorChooserClient* client, | 104 blink::WebColorChooserClient* client, |
102 const blink::WebColor& color, | 105 const blink::WebColor& color, |
103 const blink::WebVector<blink::WebColorSuggestion>& suggestions); | 106 const blink::WebVector<blink::WebColorSuggestion>& suggestions); |
104 bool RunFileChooser(const blink::WebFileChooserParams& params, | 107 bool RunFileChooser(const blink::WebFileChooserParams& params, |
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
240 }; | 243 }; |
241 void CheckDone(blink::WebLocalFrame* frame, CheckDoneReason reason); | 244 void CheckDone(blink::WebLocalFrame* frame, CheckDoneReason reason); |
242 void AnimateNow(); | 245 void AnimateNow(); |
243 void DrawSelectionRect(SkCanvas* canvas); | 246 void DrawSelectionRect(SkCanvas* canvas); |
244 void DidCapturePixelsAsync( | 247 void DidCapturePixelsAsync( |
245 const base::Callback<void(const SkBitmap&)>& callback, | 248 const base::Callback<void(const SkBitmap&)>& callback, |
246 const SkBitmap& bitmap); | 249 const SkBitmap& bitmap); |
247 | 250 |
248 blink::WebWidget* web_widget() const { return web_widget_; } | 251 blink::WebWidget* web_widget() const { return web_widget_; } |
249 | 252 |
| 253 WebTestInterfaces* web_test_interfaces_; |
250 TestInterfaces* test_interfaces_; | 254 TestInterfaces* test_interfaces_; |
251 WebTestDelegate* delegate_; | 255 WebTestDelegate* delegate_; |
252 blink::WebWidget* web_widget_; | 256 blink::WebWidget* web_widget_; |
253 | 257 |
254 WebTaskList task_list_; | 258 WebTaskList task_list_; |
255 | 259 |
256 blink::WebImage drag_image_; | 260 blink::WebImage drag_image_; |
257 | 261 |
258 scoped_ptr<SpellCheckClient> spellcheck_; | 262 scoped_ptr<SpellCheckClient> spellcheck_; |
259 scoped_ptr<MockWebUserMediaClient> user_media_client_; | 263 scoped_ptr<MockWebUserMediaClient> user_media_client_; |
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
398 | 402 |
399 private: | 403 private: |
400 virtual ~WebTestProxy() {} | 404 virtual ~WebTestProxy() {} |
401 | 405 |
402 DISALLOW_COPY_AND_ASSIGN(WebTestProxy); | 406 DISALLOW_COPY_AND_ASSIGN(WebTestProxy); |
403 }; | 407 }; |
404 | 408 |
405 } // namespace test_runner | 409 } // namespace test_runner |
406 | 410 |
407 #endif // COMPONENTS_TEST_RUNNER_WEB_TEST_PROXY_H_ | 411 #endif // COMPONENTS_TEST_RUNNER_WEB_TEST_PROXY_H_ |
OLD | NEW |