| 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_WEBTESTDELEGATE_H_ | 5 #ifndef CONTENT_SHELL_RENDERER_TEST_RUNNER_WEBTESTDELEGATE_H_ |
| 6 #define CONTENT_SHELL_RENDERER_TEST_RUNNER_WEBTESTDELEGATE_H_ | 6 #define CONTENT_SHELL_RENDERER_TEST_RUNNER_WEBTESTDELEGATE_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "third_party/WebKit/public/platform/WebScreenOrientation.h" | 10 #include "third_party/WebKit/public/platform/WebScreenOrientation.h" |
| 11 #include "third_party/WebKit/public/platform/WebString.h" | 11 #include "third_party/WebKit/public/platform/WebString.h" |
| 12 #include "third_party/WebKit/public/platform/WebURL.h" | 12 #include "third_party/WebKit/public/platform/WebURL.h" |
| 13 #include "third_party/WebKit/public/platform/WebVector.h" | 13 #include "third_party/WebKit/public/platform/WebVector.h" |
| 14 | 14 |
| 15 #define WEBTESTRUNNER_NEW_HISTORY_CAPTURE | 15 #define WEBTESTRUNNER_NEW_HISTORY_CAPTURE |
| 16 | 16 |
| 17 namespace blink { | 17 namespace blink { |
| 18 class WebDeviceMotionData; | 18 class WebDeviceMotionData; |
| 19 class WebDeviceOrientationData; | 19 class WebDeviceOrientationData; |
| 20 class WebFrame; | 20 class WebFrame; |
| 21 class WebGamepad; |
| 21 class WebGamepads; | 22 class WebGamepads; |
| 22 class WebHistoryItem; | 23 class WebHistoryItem; |
| 23 struct WebRect; | 24 struct WebRect; |
| 24 struct WebSize; | 25 struct WebSize; |
| 25 struct WebURLError; | 26 struct WebURLError; |
| 26 } | 27 } |
| 27 | 28 |
| 28 namespace WebTestRunner { | 29 namespace WebTestRunner { |
| 29 | 30 |
| 30 struct WebPreferences; | 31 struct WebPreferences; |
| 31 class WebTask; | 32 class WebTask; |
| 32 class WebTestProxyBase; | 33 class WebTestProxyBase; |
| 33 | 34 |
| 34 class WebTestDelegate { | 35 class WebTestDelegate { |
| 35 public: | 36 public: |
| 36 // Set and clear the edit command to execute on the next call to | 37 // Set and clear the edit command to execute on the next call to |
| 37 // WebViewClient::handleCurrentKeyboardEvent(). | 38 // WebViewClient::handleCurrentKeyboardEvent(). |
| 38 virtual void clearEditCommand() = 0; | 39 virtual void clearEditCommand() = 0; |
| 39 virtual void setEditCommand(const std::string& name, const std::string& valu
e) = 0; | 40 virtual void setEditCommand(const std::string& name, const std::string& valu
e) = 0; |
| 40 | 41 |
| 41 // Set the gamepads to return from Platform::sampleGamepads(). | 42 // Set the gamepads to return from Platform::sampleGamepads(). |
| 42 virtual void setGamepadData(const blink::WebGamepads&) = 0; | 43 virtual void setGamepadData(const blink::WebGamepads&) = 0; |
| 43 | 44 |
| 45 // Notifies blink about a new gamepad. |
| 46 virtual void didConnectGamepad(int index, const blink::WebGamepad&) = 0; |
| 47 |
| 48 // Notifies blink that a gamepad has been disconnected. |
| 49 virtual void didDisconnectGamepad(int index, const blink::WebGamepad&) = 0; |
| 50 |
| 44 // Set data to return when registering via Platform::setDeviceMotionListener
(). | 51 // Set data to return when registering via Platform::setDeviceMotionListener
(). |
| 45 virtual void setDeviceMotionData(const blink::WebDeviceMotionData&) = 0; | 52 virtual void setDeviceMotionData(const blink::WebDeviceMotionData&) = 0; |
| 46 // Set data to return when registering via Platform::setDeviceOrientationLis
tener(). | 53 // Set data to return when registering via Platform::setDeviceOrientationLis
tener(). |
| 47 virtual void setDeviceOrientationData(const blink::WebDeviceOrientationData&
) = 0; | 54 virtual void setDeviceOrientationData(const blink::WebDeviceOrientationData&
) = 0; |
| 48 | 55 |
| 49 // Set orientation to set when registering via Platform::setScreenOrientatio
nListener(). | 56 // Set orientation to set when registering via Platform::setScreenOrientatio
nListener(). |
| 50 virtual void setScreenOrientation(const blink::WebScreenOrientation&) = 0; | 57 virtual void setScreenOrientation(const blink::WebScreenOrientation&) = 0; |
| 51 | 58 |
| 52 // Add a message to the text dump for the layout test. | 59 // Add a message to the text dump for the layout test. |
| 53 virtual void printMessage(const std::string& message) = 0; | 60 virtual void printMessage(const std::string& message) = 0; |
| (...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 140 virtual bool allowExternalPages() = 0; | 147 virtual bool allowExternalPages() = 0; |
| 141 | 148 |
| 142 // Returns the back/forward history for the WebView associated with the | 149 // Returns the back/forward history for the WebView associated with the |
| 143 // given WebTestProxyBase as well as the index of the current entry. | 150 // given WebTestProxyBase as well as the index of the current entry. |
| 144 virtual void captureHistoryForWindow(WebTestProxyBase*, blink::WebVector<bli
nk::WebHistoryItem>*, size_t* currentEntryIndex) = 0; | 151 virtual void captureHistoryForWindow(WebTestProxyBase*, blink::WebVector<bli
nk::WebHistoryItem>*, size_t* currentEntryIndex) = 0; |
| 145 }; | 152 }; |
| 146 | 153 |
| 147 } | 154 } |
| 148 | 155 |
| 149 #endif // CONTENT_SHELL_RENDERER_TEST_RUNNER_WEBTESTDELEGATE_H_ | 156 #endif // CONTENT_SHELL_RENDERER_TEST_RUNNER_WEBTESTDELEGATE_H_ |
| OLD | NEW |