| 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_TEST_RUNNER_WEB_TEST_DELEGATE_H_ | 5 #ifndef CONTENT_SHELL_TEST_RUNNER_WEB_TEST_DELEGATE_H_ |
| 6 #define CONTENT_SHELL_TEST_RUNNER_WEB_TEST_DELEGATE_H_ | 6 #define CONTENT_SHELL_TEST_RUNNER_WEB_TEST_DELEGATE_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| 11 | 11 |
| 12 #include "base/callback_forward.h" | 12 #include "base/callback_forward.h" |
| 13 #include "base/memory/ref_counted.h" | 13 #include "base/memory/ref_counted.h" |
| 14 #include "third_party/WebKit/public/platform/WebString.h" | 14 #include "third_party/WebKit/public/platform/WebString.h" |
| 15 #include "third_party/WebKit/public/platform/WebURL.h" | 15 #include "third_party/WebKit/public/platform/WebURL.h" |
| 16 #include "third_party/WebKit/public/platform/WebVector.h" | 16 #include "third_party/WebKit/public/platform/WebVector.h" |
| 17 #include "third_party/WebKit/public/platform/modules/screen_orientation/WebScree
nOrientationType.h" | 17 #include "third_party/WebKit/public/platform/modules/screen_orientation/WebScree
nOrientationType.h" |
| 18 | 18 |
| 19 #define WEBTESTRUNNER_NEW_HISTORY_CAPTURE | 19 #define WEBTESTRUNNER_NEW_HISTORY_CAPTURE |
| 20 | 20 |
| 21 namespace base { | 21 namespace base { |
| 22 class DictionaryValue; | 22 class DictionaryValue; |
| 23 } | 23 } |
| 24 | 24 |
| 25 namespace blink { | 25 namespace blink { |
| 26 class WebDeviceMotionData; |
| 27 class WebDeviceOrientationData; |
| 26 class WebFrame; | 28 class WebFrame; |
| 27 class WebInputEvent; | 29 class WebInputEvent; |
| 28 class WebLocalFrame; | 30 class WebLocalFrame; |
| 29 class WebMediaStream; | 31 class WebMediaStream; |
| 30 class WebPlugin; | 32 class WebPlugin; |
| 31 struct WebPluginParams; | 33 struct WebPluginParams; |
| 32 struct WebSize; | 34 struct WebSize; |
| 33 class WebURLRequest; | 35 class WebURLRequest; |
| 34 class WebURLResponse; | 36 class WebURLResponse; |
| 35 class WebView; | 37 class WebView; |
| 36 } | 38 } |
| 37 | 39 |
| 38 namespace cc { | 40 namespace cc { |
| 39 class SharedBitmapManager; | 41 class SharedBitmapManager; |
| 40 } | 42 } |
| 41 | 43 |
| 42 namespace device { | |
| 43 class MotionData; | |
| 44 class OrientationData; | |
| 45 } | |
| 46 | |
| 47 namespace test_runner { | 44 namespace test_runner { |
| 48 | 45 |
| 49 class GamepadController; | 46 class GamepadController; |
| 50 class WebTask; | 47 class WebTask; |
| 51 class WebWidgetTestProxyBase; | 48 class WebWidgetTestProxyBase; |
| 52 struct TestPreferences; | 49 struct TestPreferences; |
| 53 | 50 |
| 54 class WebTestDelegate { | 51 class WebTestDelegate { |
| 55 public: | 52 public: |
| 56 // Set and clear the edit command to execute on the next call to | 53 // Set and clear the edit command to execute on the next call to |
| 57 // WebViewClient::handleCurrentKeyboardEvent(). | 54 // WebViewClient::handleCurrentKeyboardEvent(). |
| 58 virtual void ClearEditCommand() = 0; | 55 virtual void ClearEditCommand() = 0; |
| 59 virtual void SetEditCommand(const std::string& name, | 56 virtual void SetEditCommand(const std::string& name, |
| 60 const std::string& value) = 0; | 57 const std::string& value) = 0; |
| 61 | 58 |
| 62 // Sets gamepad provider to be used for tests. | 59 // Sets gamepad provider to be used for tests. |
| 63 virtual void SetGamepadProvider(GamepadController* controller) = 0; | 60 virtual void SetGamepadProvider(GamepadController* controller) = 0; |
| 64 | 61 |
| 65 // Set data to return when registering via | 62 // Set data to return when registering via |
| 66 // Platform::setDeviceMotionListener(). | 63 // Platform::setDeviceMotionListener(). |
| 67 virtual void SetDeviceMotionData(const device::MotionData& data) = 0; | 64 virtual void SetDeviceMotionData(const blink::WebDeviceMotionData& data) = 0; |
| 68 // Set data to return when registering via | 65 // Set data to return when registering via |
| 69 // Platform::setDeviceOrientationListener(). | 66 // Platform::setDeviceOrientationListener(). |
| 70 virtual void SetDeviceOrientationData( | 67 virtual void SetDeviceOrientationData( |
| 71 const device::OrientationData& data) = 0; | 68 const blink::WebDeviceOrientationData& data) = 0; |
| 72 | 69 |
| 73 // Add a message to stderr (not saved to expected output files, for debugging | 70 // Add a message to stderr (not saved to expected output files, for debugging |
| 74 // only). | 71 // only). |
| 75 virtual void PrintMessageToStderr(const std::string& message) = 0; | 72 virtual void PrintMessageToStderr(const std::string& message) = 0; |
| 76 | 73 |
| 77 // Add a message to the text dump for the layout test. | 74 // Add a message to the text dump for the layout test. |
| 78 virtual void PrintMessage(const std::string& message) = 0; | 75 virtual void PrintMessage(const std::string& message) = 0; |
| 79 | 76 |
| 80 // The delegate takes ownership of the WebTask objects and is responsible | 77 // The delegate takes ownership of the WebTask objects and is responsible |
| 81 // for deleting them. | 78 // for deleting them. |
| (...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 301 virtual bool IsNavigationInitiatedByRenderer( | 298 virtual bool IsNavigationInitiatedByRenderer( |
| 302 const blink::WebURLRequest& request) = 0; | 299 const blink::WebURLRequest& request) = 0; |
| 303 | 300 |
| 304 protected: | 301 protected: |
| 305 virtual ~WebTestDelegate() {} | 302 virtual ~WebTestDelegate() {} |
| 306 }; | 303 }; |
| 307 | 304 |
| 308 } // namespace test_runner | 305 } // namespace test_runner |
| 309 | 306 |
| 310 #endif // CONTENT_SHELL_TEST_RUNNER_WEB_TEST_DELEGATE_H_ | 307 #endif // CONTENT_SHELL_TEST_RUNNER_WEB_TEST_DELEGATE_H_ |
| OLD | NEW |