| 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 COMPONENTS_TEST_RUNNER_WEB_TEST_DELEGATE_H_ | 5 #ifndef COMPONENTS_TEST_RUNNER_WEB_TEST_DELEGATE_H_ |
| 6 #define COMPONENTS_TEST_RUNNER_WEB_TEST_DELEGATE_H_ | 6 #define COMPONENTS_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/WebTaskRunner.h" | 15 #include "third_party/WebKit/public/platform/WebTaskRunner.h" |
| 16 #include "third_party/WebKit/public/platform/WebURL.h" | 16 #include "third_party/WebKit/public/platform/WebURL.h" |
| 17 #include "third_party/WebKit/public/platform/WebVector.h" | 17 #include "third_party/WebKit/public/platform/WebVector.h" |
| 18 #include "third_party/WebKit/public/platform/modules/screen_orientation/WebScree
nOrientationType.h" | 18 #include "third_party/WebKit/public/platform/modules/screen_orientation/WebScree
nOrientationType.h" |
| 19 | 19 |
| 20 #define WEBTESTRUNNER_NEW_HISTORY_CAPTURE | 20 #define WEBTESTRUNNER_NEW_HISTORY_CAPTURE |
| 21 | 21 |
| 22 namespace base { | 22 namespace base { |
| 23 class DictionaryValue; | 23 class DictionaryValue; |
| 24 } | 24 } |
| 25 | 25 |
| 26 namespace blink { | 26 namespace blink { |
| 27 class WebDeviceMotionData; | |
| 28 class WebDeviceOrientationData; | |
| 29 class WebLocalFrame; | 27 class WebLocalFrame; |
| 30 class WebGamepad; | 28 class WebGamepad; |
| 31 class WebGamepads; | 29 class WebGamepads; |
| 32 class WebHistoryItem; | 30 class WebHistoryItem; |
| 33 class WebInputEvent; | 31 class WebInputEvent; |
| 34 class WebLayer; | 32 class WebLayer; |
| 35 class WebLocalFrame; | 33 class WebLocalFrame; |
| 36 class WebMediaStream; | 34 class WebMediaStream; |
| 37 class WebPlugin; | 35 class WebPlugin; |
| 38 struct WebPluginParams; | 36 struct WebPluginParams; |
| 39 struct WebPoint; | 37 struct WebPoint; |
| 40 struct WebRect; | 38 struct WebRect; |
| 41 struct WebSize; | 39 struct WebSize; |
| 42 struct WebURLError; | 40 struct WebURLError; |
| 43 class WebURLResponse; | 41 class WebURLResponse; |
| 44 class WebView; | 42 class WebView; |
| 45 } | 43 } |
| 46 | 44 |
| 47 namespace cc { | 45 namespace cc { |
| 48 class TextureLayer; | 46 class TextureLayer; |
| 49 class TextureLayerClient; | 47 class TextureLayerClient; |
| 50 class SharedBitmapManager; | 48 class SharedBitmapManager; |
| 51 } | 49 } |
| 52 | 50 |
| 51 namespace device { |
| 52 class MotionData; |
| 53 class OrientationData; |
| 54 } |
| 55 |
| 53 namespace test_runner { | 56 namespace test_runner { |
| 54 | 57 |
| 55 class DeviceLightData; | 58 class DeviceLightData; |
| 56 class GamepadController; | 59 class GamepadController; |
| 57 class WebTask; | 60 class WebTask; |
| 58 class WebWidgetTestProxyBase; | 61 class WebWidgetTestProxyBase; |
| 59 struct TestPreferences; | 62 struct TestPreferences; |
| 60 | 63 |
| 61 class WebTestDelegate { | 64 class WebTestDelegate { |
| 62 public: | 65 public: |
| 63 // Set and clear the edit command to execute on the next call to | 66 // Set and clear the edit command to execute on the next call to |
| 64 // WebViewClient::handleCurrentKeyboardEvent(). | 67 // WebViewClient::handleCurrentKeyboardEvent(). |
| 65 virtual void ClearEditCommand() = 0; | 68 virtual void ClearEditCommand() = 0; |
| 66 virtual void SetEditCommand(const std::string& name, | 69 virtual void SetEditCommand(const std::string& name, |
| 67 const std::string& value) = 0; | 70 const std::string& value) = 0; |
| 68 | 71 |
| 69 // Sets gamepad provider to be used for tests. | 72 // Sets gamepad provider to be used for tests. |
| 70 virtual void SetGamepadProvider(GamepadController* controller) = 0; | 73 virtual void SetGamepadProvider(GamepadController* controller) = 0; |
| 71 | 74 |
| 72 // Set data to return when registering via | 75 // Set data to return when registering via |
| 73 // Platform::setDeviceLightListener(). | 76 // Platform::setDeviceLightListener(). |
| 74 virtual void SetDeviceLightData(const double data) = 0; | 77 virtual void SetDeviceLightData(const double data) = 0; |
| 75 // Set data to return when registering via | 78 // Set data to return when registering via |
| 76 // Platform::setDeviceMotionListener(). | 79 // Platform::setDeviceMotionListener(). |
| 77 virtual void SetDeviceMotionData(const blink::WebDeviceMotionData& data) = 0; | 80 virtual void SetDeviceMotionData(const device::MotionData& data) = 0; |
| 78 // Set data to return when registering via | 81 // Set data to return when registering via |
| 79 // Platform::setDeviceOrientationListener(). | 82 // Platform::setDeviceOrientationListener(). |
| 80 virtual void SetDeviceOrientationData( | 83 virtual void SetDeviceOrientationData( |
| 81 const blink::WebDeviceOrientationData& data) = 0; | 84 const device::OrientationData& data) = 0; |
| 82 | 85 |
| 83 // Add a message to the text dump for the layout test. | 86 // Add a message to the text dump for the layout test. |
| 84 virtual void PrintMessage(const std::string& message) = 0; | 87 virtual void PrintMessage(const std::string& message) = 0; |
| 85 | 88 |
| 86 // The delegate takes ownership of the WebTask objects and is responsible | 89 // The delegate takes ownership of the WebTask objects and is responsible |
| 87 // for deleting them. | 90 // for deleting them. |
| 88 virtual void PostTask(const base::Closure& task) = 0; | 91 virtual void PostTask(const base::Closure& task) = 0; |
| 89 virtual void PostDelayedTask(const base::Closure& task, long long ms) = 0; | 92 virtual void PostDelayedTask(const base::Closure& task, long long ms) = 0; |
| 90 | 93 |
| 91 // Register a new isolated filesystem with the given files, and return the | 94 // Register a new isolated filesystem with the given files, and return the |
| (...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 290 | 293 |
| 291 virtual float GetDeviceScaleFactor() const = 0; | 294 virtual float GetDeviceScaleFactor() const = 0; |
| 292 | 295 |
| 293 // Run all pending idle tasks, and then run callback. | 296 // Run all pending idle tasks, and then run callback. |
| 294 virtual void RunIdleTasks(const base::Closure& callback) = 0; | 297 virtual void RunIdleTasks(const base::Closure& callback) = 0; |
| 295 }; | 298 }; |
| 296 | 299 |
| 297 } // namespace test_runner | 300 } // namespace test_runner |
| 298 | 301 |
| 299 #endif // COMPONENTS_TEST_RUNNER_WEB_TEST_DELEGATE_H_ | 302 #endif // COMPONENTS_TEST_RUNNER_WEB_TEST_DELEGATE_H_ |
| OLD | NEW |