| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2012 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 22 matching lines...) Expand all Loading... |
| 33 | 33 |
| 34 #include "public/platform/WebString.h" | 34 #include "public/platform/WebString.h" |
| 35 #include "public/platform/WebURL.h" | 35 #include "public/platform/WebURL.h" |
| 36 #include "public/platform/WebVector.h" | 36 #include "public/platform/WebVector.h" |
| 37 #include <string> | 37 #include <string> |
| 38 | 38 |
| 39 #define WEBTESTRUNNER_NEW_HISTORY_CAPTURE | 39 #define WEBTESTRUNNER_NEW_HISTORY_CAPTURE |
| 40 | 40 |
| 41 namespace WebKit { | 41 namespace WebKit { |
| 42 class WebDeviceMotionData; | 42 class WebDeviceMotionData; |
| 43 class WebDeviceOrientationData; |
| 43 class WebFrame; | 44 class WebFrame; |
| 44 class WebGamepads; | 45 class WebGamepads; |
| 45 class WebHistoryItem; | 46 class WebHistoryItem; |
| 46 struct WebRect; | 47 struct WebRect; |
| 47 struct WebSize; | 48 struct WebSize; |
| 48 struct WebURLError; | 49 struct WebURLError; |
| 49 } | 50 } |
| 50 | 51 |
| 51 namespace WebTestRunner { | 52 namespace WebTestRunner { |
| 52 | 53 |
| 53 struct WebPreferences; | 54 struct WebPreferences; |
| 54 class WebTask; | 55 class WebTask; |
| 55 class WebTestProxyBase; | 56 class WebTestProxyBase; |
| 56 | 57 |
| 57 class WebTestDelegate { | 58 class WebTestDelegate { |
| 58 public: | 59 public: |
| 59 // Set and clear the edit command to execute on the next call to | 60 // Set and clear the edit command to execute on the next call to |
| 60 // WebViewClient::handleCurrentKeyboardEvent(). | 61 // WebViewClient::handleCurrentKeyboardEvent(). |
| 61 virtual void clearEditCommand() = 0; | 62 virtual void clearEditCommand() = 0; |
| 62 virtual void setEditCommand(const std::string& name, const std::string& valu
e) = 0; | 63 virtual void setEditCommand(const std::string& name, const std::string& valu
e) = 0; |
| 63 | 64 |
| 64 // Set the gamepads to return from Platform::sampleGamepads(). | 65 // Set the gamepads to return from Platform::sampleGamepads(). |
| 65 virtual void setGamepadData(const WebKit::WebGamepads&) = 0; | 66 virtual void setGamepadData(const WebKit::WebGamepads&) = 0; |
| 66 | 67 |
| 68 // Set data to return when registering via Platform::setDeviceMotionListener
(). |
| 67 virtual void setDeviceMotionData(const WebKit::WebDeviceMotionData&) = 0; | 69 virtual void setDeviceMotionData(const WebKit::WebDeviceMotionData&) = 0; |
| 70 // Set data to return when registering via Platform::setDeviceOrientationLis
tener(). |
| 71 virtual void setDeviceOrientationData(const WebKit::WebDeviceOrientationData
&) = 0; |
| 68 | 72 |
| 69 // Add a message to the text dump for the layout test. | 73 // Add a message to the text dump for the layout test. |
| 70 virtual void printMessage(const std::string& message) = 0; | 74 virtual void printMessage(const std::string& message) = 0; |
| 71 | 75 |
| 72 // The delegate takes ownership of the WebTask objects and is responsible | 76 // The delegate takes ownership of the WebTask objects and is responsible |
| 73 // for deleting them. | 77 // for deleting them. |
| 74 virtual void postTask(WebTask*) = 0; | 78 virtual void postTask(WebTask*) = 0; |
| 75 virtual void postDelayedTask(WebTask*, long long ms) = 0; | 79 virtual void postDelayedTask(WebTask*, long long ms) = 0; |
| 76 | 80 |
| 77 // Register a new isolated filesystem with the given files, and return the | 81 // Register a new isolated filesystem with the given files, and return the |
| (...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 160 virtual bool allowExternalPages() = 0; | 164 virtual bool allowExternalPages() = 0; |
| 161 | 165 |
| 162 // Returns the back/forward history for the WebView associated with the | 166 // Returns the back/forward history for the WebView associated with the |
| 163 // given WebTestProxyBase as well as the index of the current entry. | 167 // given WebTestProxyBase as well as the index of the current entry. |
| 164 virtual void captureHistoryForWindow(WebTestProxyBase*, WebKit::WebVector<We
bKit::WebHistoryItem>*, size_t* currentEntryIndex) = 0; | 168 virtual void captureHistoryForWindow(WebTestProxyBase*, WebKit::WebVector<We
bKit::WebHistoryItem>*, size_t* currentEntryIndex) = 0; |
| 165 }; | 169 }; |
| 166 | 170 |
| 167 } | 171 } |
| 168 | 172 |
| 169 #endif // WebTestDelegate_h | 173 #endif // WebTestDelegate_h |
| OLD | NEW |