| 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 <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/callback.h" | 10 #include "base/callback.h" |
| 11 #include "base/macros.h" | 11 #include "base/macros.h" |
| 12 #include "base/memory/scoped_ptr.h" | 12 #include "base/memory/scoped_ptr.h" |
| 13 #include "build/build_config.h" | 13 #include "build/build_config.h" |
| 14 #include "components/test_runner/test_runner_export.h" | 14 #include "components/test_runner/test_runner_export.h" |
| 15 #include "components/test_runner/web_task.h" | 15 #include "components/test_runner/web_task.h" |
| 16 #include "third_party/WebKit/public/platform/WebImage.h" |
| 16 #include "third_party/WebKit/public/platform/WebRect.h" | 17 #include "third_party/WebKit/public/platform/WebRect.h" |
| 17 #include "third_party/WebKit/public/platform/WebScreenInfo.h" | 18 #include "third_party/WebKit/public/platform/WebScreenInfo.h" |
| 18 #include "third_party/WebKit/public/platform/WebURLError.h" | 19 #include "third_party/WebKit/public/platform/WebURLError.h" |
| 19 #include "third_party/WebKit/public/platform/WebURLRequest.h" | 20 #include "third_party/WebKit/public/platform/WebURLRequest.h" |
| 20 #include "third_party/WebKit/public/web/WebDOMMessageEvent.h" | 21 #include "third_party/WebKit/public/web/WebDOMMessageEvent.h" |
| 21 #include "third_party/WebKit/public/web/WebDragOperation.h" | 22 #include "third_party/WebKit/public/web/WebDragOperation.h" |
| 22 #include "third_party/WebKit/public/web/WebHistoryCommitType.h" | 23 #include "third_party/WebKit/public/web/WebHistoryCommitType.h" |
| 23 #include "third_party/WebKit/public/web/WebNavigationPolicy.h" | 24 #include "third_party/WebKit/public/web/WebNavigationPolicy.h" |
| 24 #include "third_party/WebKit/public/web/WebTextDirection.h" | 25 #include "third_party/WebKit/public/web/WebTextDirection.h" |
| 25 | 26 |
| 27 class SkBitmap; |
| 28 class SkCanvas; |
| 29 |
| 26 namespace blink { | 30 namespace blink { |
| 27 class WebDragData; | 31 class WebDragData; |
| 28 class WebFileChooserCompletion; | 32 class WebFileChooserCompletion; |
| 29 class WebImage; | |
| 30 class WebLocalFrame; | 33 class WebLocalFrame; |
| 31 class WebSpeechRecognizer; | 34 class WebSpeechRecognizer; |
| 32 class WebSpellCheckClient; | 35 class WebSpellCheckClient; |
| 33 class WebString; | 36 class WebString; |
| 34 class WebView; | 37 class WebView; |
| 35 class WebWidget; | 38 class WebWidget; |
| 36 struct WebFileChooserParams; | 39 struct WebFileChooserParams; |
| 37 struct WebPoint; | 40 struct WebPoint; |
| 38 struct WebWindowFeatures; | 41 struct WebWindowFeatures; |
| 39 } | 42 } |
| (...skipping 22 matching lines...) Expand all Loading... |
| 62 | 65 |
| 63 blink::WebSpellCheckClient* GetSpellCheckClient() const; | 66 blink::WebSpellCheckClient* GetSpellCheckClient() const; |
| 64 bool RunFileChooser(const blink::WebFileChooserParams& params, | 67 bool RunFileChooser(const blink::WebFileChooserParams& params, |
| 65 blink::WebFileChooserCompletion* completion); | 68 blink::WebFileChooserCompletion* completion); |
| 66 void ShowValidationMessage(const blink::WebString& main_message, | 69 void ShowValidationMessage(const blink::WebString& main_message, |
| 67 blink::WebTextDirection main_message_hint, | 70 blink::WebTextDirection main_message_hint, |
| 68 const blink::WebString& sub_message, | 71 const blink::WebString& sub_message, |
| 69 blink::WebTextDirection sub_message_hint); | 72 blink::WebTextDirection sub_message_hint); |
| 70 | 73 |
| 71 std::string DumpBackForwardLists(); | 74 std::string DumpBackForwardLists(); |
| 75 void CapturePixelsForPrinting( |
| 76 const base::Callback<void(const SkBitmap&)>& callback); |
| 77 void CopyImageAtAndCapturePixels( |
| 78 int x, int y, const base::Callback<void(const SkBitmap&)>& callback); |
| 79 void CapturePixelsAsync( |
| 80 const base::Callback<void(const SkBitmap&)>& callback); |
| 72 | 81 |
| 73 void LayoutAndPaintAsyncThen(const base::Closure& callback); | 82 void LayoutAndPaintAsyncThen(const base::Closure& callback); |
| 74 | 83 |
| 75 void GetScreenOrientationForTesting(blink::WebScreenInfo&); | 84 void GetScreenOrientationForTesting(blink::WebScreenInfo&); |
| 76 MockWebSpeechRecognizer* GetSpeechRecognizerMock(); | 85 MockWebSpeechRecognizer* GetSpeechRecognizerMock(); |
| 77 MockCredentialManagerClient* GetCredentialManagerClientMock(); | 86 MockCredentialManagerClient* GetCredentialManagerClientMock(); |
| 78 | 87 |
| 79 WebTaskList* mutable_task_list() { return &task_list_; } | 88 WebTaskList* mutable_task_list() { return &task_list_; } |
| 80 | 89 |
| 81 blink::WebView* GetWebView() const; | 90 blink::WebView* GetWebView() const; |
| (...skipping 29 matching lines...) Expand all Loading... |
| 111 void DidFocus(); | 120 void DidFocus(); |
| 112 void SetToolTipText(const blink::WebString& text, | 121 void SetToolTipText(const blink::WebString& text, |
| 113 blink::WebTextDirection direction); | 122 blink::WebTextDirection direction); |
| 114 void DidChangeLocationWithinPage(blink::WebLocalFrame* frame); | 123 void DidChangeLocationWithinPage(blink::WebLocalFrame* frame); |
| 115 void ResetInputMethod(); | 124 void ResetInputMethod(); |
| 116 | 125 |
| 117 blink::WebString acceptLanguages(); | 126 blink::WebString acceptLanguages(); |
| 118 | 127 |
| 119 private: | 128 private: |
| 120 void AnimateNow(); | 129 void AnimateNow(); |
| 130 void DrawSelectionRect(SkCanvas* canvas); |
| 131 void DidCapturePixelsAsync( |
| 132 const base::Callback<void(const SkBitmap&)>& callback, |
| 133 const SkBitmap& bitmap); |
| 121 | 134 |
| 122 TestInterfaces* test_interfaces_; | 135 TestInterfaces* test_interfaces_; |
| 123 WebTestDelegate* delegate_; | 136 WebTestDelegate* delegate_; |
| 124 blink::WebWidget* web_widget_; | 137 blink::WebWidget* web_widget_; |
| 125 | 138 |
| 126 WebTaskList task_list_; | 139 WebTaskList task_list_; |
| 127 | 140 |
| 141 blink::WebImage drag_image_; |
| 142 |
| 128 scoped_ptr<SpellCheckClient> spellcheck_; | 143 scoped_ptr<SpellCheckClient> spellcheck_; |
| 129 | 144 |
| 130 bool animate_scheduled_; | 145 bool animate_scheduled_; |
| 131 | 146 |
| 132 scoped_ptr<MockCredentialManagerClient> credential_manager_client_; | 147 scoped_ptr<MockCredentialManagerClient> credential_manager_client_; |
| 133 scoped_ptr<MockWebSpeechRecognizer> speech_recognizer_; | 148 scoped_ptr<MockWebSpeechRecognizer> speech_recognizer_; |
| 134 | 149 |
| 135 private: | 150 private: |
| 136 DISALLOW_COPY_AND_ASSIGN(WebTestProxyBase); | 151 DISALLOW_COPY_AND_ASSIGN(WebTestProxyBase); |
| 137 }; | 152 }; |
| (...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 245 | 260 |
| 246 private: | 261 private: |
| 247 virtual ~WebTestProxy() {} | 262 virtual ~WebTestProxy() {} |
| 248 | 263 |
| 249 DISALLOW_COPY_AND_ASSIGN(WebTestProxy); | 264 DISALLOW_COPY_AND_ASSIGN(WebTestProxy); |
| 250 }; | 265 }; |
| 251 | 266 |
| 252 } // namespace test_runner | 267 } // namespace test_runner |
| 253 | 268 |
| 254 #endif // COMPONENTS_TEST_RUNNER_WEB_TEST_PROXY_H_ | 269 #endif // COMPONENTS_TEST_RUNNER_WEB_TEST_PROXY_H_ |
| OLD | NEW |