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 21 matching lines...) Expand all Loading... |
32 #define WebTestDelegate_h | 32 #define WebTestDelegate_h |
33 | 33 |
34 #include "Platform/chromium/public/WebString.h" | 34 #include "Platform/chromium/public/WebString.h" |
35 #include "Platform/chromium/public/WebURL.h" | 35 #include "Platform/chromium/public/WebURL.h" |
36 #include "Platform/chromium/public/WebVector.h" | 36 #include "Platform/chromium/public/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 WebDeviceMotionHandler; |
42 class WebFrame; | 43 class WebFrame; |
43 class WebGamepads; | 44 class WebGamepads; |
44 class WebHistoryItem; | 45 class WebHistoryItem; |
45 class WebMediaPlayer; | 46 class WebMediaPlayer; |
46 class WebMediaPlayerClient; | 47 class WebMediaPlayerClient; |
47 struct WebRect; | 48 struct WebRect; |
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 the WebDeviceMotionHandler to return from Platform::deviceMotionHandl
er(). |
| 69 virtual void setDeviceMotionHandler(WebKit::WebDeviceMotionHandler*) { }; |
| 70 |
67 // Add a message to the text dump for the layout test. | 71 // Add a message to the text dump for the layout test. |
68 virtual void printMessage(const std::string& message) = 0; | 72 virtual void printMessage(const std::string& message) = 0; |
69 | 73 |
70 // The delegate takes ownership of the WebTask objects and is responsible | 74 // The delegate takes ownership of the WebTask objects and is responsible |
71 // for deleting them. | 75 // for deleting them. |
72 virtual void postTask(WebTask*) = 0; | 76 virtual void postTask(WebTask*) = 0; |
73 virtual void postDelayedTask(WebTask*, long long ms) = 0; | 77 virtual void postDelayedTask(WebTask*, long long ms) = 0; |
74 | 78 |
75 // Register a new isolated filesystem with the given files, and return the | 79 // Register a new isolated filesystem with the given files, and return the |
76 // new filesystem id. | 80 // new filesystem id. |
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
158 // given WebTestProxyBase as well as the index of the current entry. | 162 // given WebTestProxyBase as well as the index of the current entry. |
159 virtual void captureHistoryForWindow(WebTestProxyBase*, WebKit::WebVector<We
bKit::WebHistoryItem>*, size_t* currentEntryIndex) = 0; | 163 virtual void captureHistoryForWindow(WebTestProxyBase*, WebKit::WebVector<We
bKit::WebHistoryItem>*, size_t* currentEntryIndex) = 0; |
160 | 164 |
161 // Returns a media player corresponding to |url| as src. | 165 // Returns a media player corresponding to |url| as src. |
162 virtual WebKit::WebMediaPlayer* createWebMediaPlayer(WebKit::WebFrame*, cons
t WebKit::WebURL&, WebKit::WebMediaPlayerClient*) = 0; | 166 virtual WebKit::WebMediaPlayer* createWebMediaPlayer(WebKit::WebFrame*, cons
t WebKit::WebURL&, WebKit::WebMediaPlayerClient*) = 0; |
163 }; | 167 }; |
164 | 168 |
165 } | 169 } |
166 | 170 |
167 #endif // WebTestDelegate_h | 171 #endif // WebTestDelegate_h |
OLD | NEW |