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_WEBTESTPROXY_H_ | 5 #ifndef CONTENT_SHELL_RENDERER_TEST_RUNNER_WEBTESTPROXY_H_ |
6 #define CONTENT_SHELL_RENDERER_TEST_RUNNER_WEBTESTPROXY_H_ | 6 #define CONTENT_SHELL_RENDERER_TEST_RUNNER_WEBTESTPROXY_H_ |
7 | 7 |
| 8 #include <deque> |
8 #include <map> | 9 #include <map> |
9 #include <string> | 10 #include <string> |
10 | 11 |
11 #include "base/basictypes.h" | 12 #include "base/basictypes.h" |
12 #include "base/callback.h" | 13 #include "base/callback.h" |
13 #include "base/memory/scoped_ptr.h" | 14 #include "base/memory/scoped_ptr.h" |
14 #include "content/shell/renderer/test_runner/WebTask.h" | 15 #include "content/shell/renderer/test_runner/WebTask.h" |
15 #include "third_party/WebKit/public/platform/WebCompositeAndReadbackAsyncCallbac
k.h" | 16 #include "third_party/WebKit/public/platform/WebCompositeAndReadbackAsyncCallbac
k.h" |
16 #include "third_party/WebKit/public/platform/WebRect.h" | 17 #include "third_party/WebKit/public/platform/WebRect.h" |
17 #include "third_party/WebKit/public/platform/WebURLError.h" | 18 #include "third_party/WebKit/public/platform/WebURLError.h" |
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
102 | 103 |
103 void setLogConsoleOutput(bool enabled); | 104 void setLogConsoleOutput(bool enabled); |
104 | 105 |
105 // FIXME: Make this private again. | 106 // FIXME: Make this private again. |
106 void scheduleComposite(); | 107 void scheduleComposite(); |
107 | 108 |
108 void didOpenChooser(); | 109 void didOpenChooser(); |
109 void didCloseChooser(); | 110 void didCloseChooser(); |
110 bool isChooserShown(); | 111 bool isChooserShown(); |
111 | 112 |
112 void display(base::Closure callback); | |
113 void displayAsyncThen(base::Closure callback); | 113 void displayAsyncThen(base::Closure callback); |
114 | 114 |
115 void discardBackingStore(); | 115 void discardBackingStore(); |
116 | 116 |
117 blink::WebMIDIClientMock* midiClientMock(); | 117 blink::WebMIDIClientMock* midiClientMock(); |
118 MockWebSpeechRecognizer* speechRecognizerMock(); | 118 MockWebSpeechRecognizer* speechRecognizerMock(); |
119 | 119 |
120 WebTaskList* taskList() { return &m_taskList; } | 120 WebTaskList* taskList() { return &m_taskList; } |
121 | 121 |
122 blink::WebView* webView(); | 122 blink::WebView* webView(); |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
188 private: | 188 private: |
189 template<class, typename, typename> friend class WebFrameTestProxy; | 189 template<class, typename, typename> friend class WebFrameTestProxy; |
190 void locationChangeDone(blink::WebFrame*); | 190 void locationChangeDone(blink::WebFrame*); |
191 void paintRect(const blink::WebRect&); | 191 void paintRect(const blink::WebRect&); |
192 void paintInvalidatedRegion(); | 192 void paintInvalidatedRegion(); |
193 void paintPagesWithBoundaries(); | 193 void paintPagesWithBoundaries(); |
194 SkCanvas* canvas(); | 194 SkCanvas* canvas(); |
195 void invalidateAll(); | 195 void invalidateAll(); |
196 void animateNow(); | 196 void animateNow(); |
197 void DrawSelectionRect(SkCanvas* canvas); | 197 void DrawSelectionRect(SkCanvas* canvas); |
| 198 void DisplayForSoftwareMode(const base::Closure& callback); |
| 199 void DidDisplayAsync(const base::Closure& callback, const SkBitmap& bitmap); |
198 | 200 |
199 blink::WebWidget* webWidget(); | 201 blink::WebWidget* webWidget(); |
200 | 202 |
201 TestInterfaces* m_testInterfaces; | 203 TestInterfaces* m_testInterfaces; |
202 WebTestDelegate* m_delegate; | 204 WebTestDelegate* m_delegate; |
203 blink::WebWidget* m_webWidget; | 205 blink::WebWidget* m_webWidget; |
204 | 206 |
205 WebTaskList m_taskList; | 207 WebTaskList m_taskList; |
206 | 208 |
207 scoped_ptr<SpellCheckClient> m_spellcheck; | 209 scoped_ptr<SpellCheckClient> m_spellcheck; |
208 scoped_ptr<WebUserMediaClientMock> m_userMediaClient; | 210 scoped_ptr<WebUserMediaClientMock> m_userMediaClient; |
209 | 211 |
210 // Painting. | 212 // Painting. |
211 scoped_ptr<SkCanvas> m_canvas; | 213 scoped_ptr<SkCanvas> m_canvas; |
212 blink::WebRect m_paintRect; | 214 blink::WebRect m_paintRect; |
213 bool m_isPainting; | 215 bool m_isPainting; |
214 bool m_animateScheduled; | 216 bool m_animateScheduled; |
215 std::map<unsigned, std::string> m_resourceIdentifierMap; | 217 std::map<unsigned, std::string> m_resourceIdentifierMap; |
216 std::map<unsigned, blink::WebURLRequest> m_requestMap; | 218 std::map<unsigned, blink::WebURLRequest> m_requestMap; |
217 base::Callback<void(const SkBitmap&)> m_compositeAndReadbackCallback; | 219 std::deque<base::Callback<void(const SkBitmap&)> > |
| 220 m_compositeAndReadbackCallbacks; |
218 | 221 |
219 bool m_logConsoleOutput; | 222 bool m_logConsoleOutput; |
220 int m_chooserCount; | 223 int m_chooserCount; |
221 | 224 |
222 scoped_ptr<blink::WebMIDIClientMock> m_midiClient; | 225 scoped_ptr<blink::WebMIDIClientMock> m_midiClient; |
223 scoped_ptr<MockWebSpeechRecognizer> m_speechRecognizer; | 226 scoped_ptr<MockWebSpeechRecognizer> m_speechRecognizer; |
224 | 227 |
225 private: | 228 private: |
226 DISALLOW_COPY_AND_ASSIGN(WebTestProxyBase); | 229 DISALLOW_COPY_AND_ASSIGN(WebTestProxyBase); |
227 }; | 230 }; |
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
368 WebTestProxyBase::postSpellCheckEvent(eventName); | 371 WebTestProxyBase::postSpellCheckEvent(eventName); |
369 } | 372 } |
370 | 373 |
371 private: | 374 private: |
372 DISALLOW_COPY_AND_ASSIGN(WebTestProxy); | 375 DISALLOW_COPY_AND_ASSIGN(WebTestProxy); |
373 }; | 376 }; |
374 | 377 |
375 } // namespace content | 378 } // namespace content |
376 | 379 |
377 #endif // CONTENT_SHELL_RENDERER_TEST_RUNNER_WEBTESTPROXY_H_ | 380 #endif // CONTENT_SHELL_RENDERER_TEST_RUNNER_WEBTESTPROXY_H_ |
OLD | NEW |