OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_WEB_TEST_PROXY_H_ | 5 #ifndef CONTENT_SHELL_RENDERER_TEST_RUNNER_WEB_TEST_PROXY_H_ |
6 #define CONTENT_SHELL_RENDERER_TEST_RUNNER_WEB_TEST_PROXY_H_ | 6 #define CONTENT_SHELL_RENDERER_TEST_RUNNER_WEB_TEST_PROXY_H_ |
7 | 7 |
8 #include <deque> | 8 #include <deque> |
9 #include <map> | 9 #include <map> |
10 #include <string> | 10 #include <string> |
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
100 | 100 |
101 void Reset(); | 101 void Reset(); |
102 | 102 |
103 blink::WebSpellCheckClient* GetSpellCheckClient() const; | 103 blink::WebSpellCheckClient* GetSpellCheckClient() const; |
104 blink::WebColorChooser* CreateColorChooser( | 104 blink::WebColorChooser* CreateColorChooser( |
105 blink::WebColorChooserClient* client, | 105 blink::WebColorChooserClient* client, |
106 const blink::WebColor& color, | 106 const blink::WebColor& color, |
107 const blink::WebVector<blink::WebColorSuggestion>& suggestions); | 107 const blink::WebVector<blink::WebColorSuggestion>& suggestions); |
108 bool RunFileChooser(const blink::WebFileChooserParams& params, | 108 bool RunFileChooser(const blink::WebFileChooserParams& params, |
109 blink::WebFileChooserCompletion* completion); | 109 blink::WebFileChooserCompletion* completion); |
110 void ShowValidationMessage(const blink::WebRect& anchor_in_root_view, | 110 void ShowValidationMessage(const base::string16& message, |
111 const blink::WebString& message, | 111 const base::string16& sub_message); |
112 const blink::WebString& sub_message, | |
113 blink::WebTextDirection hint); | |
114 void HideValidationMessage(); | 112 void HideValidationMessage(); |
115 void MoveValidationMessage(const blink::WebRect& anchor_in_root_view); | 113 void MoveValidationMessage(const blink::WebRect& anchor_in_root_view); |
116 | 114 |
117 std::string CaptureTree(bool debug_render_tree); | 115 std::string CaptureTree(bool debug_render_tree); |
118 void CapturePixelsForPrinting( | 116 void CapturePixelsForPrinting( |
119 const base::Callback<void(const SkBitmap&)>& callback); | 117 const base::Callback<void(const SkBitmap&)>& callback); |
120 void CopyImageAtAndCapturePixels( | 118 void CopyImageAtAndCapturePixels( |
121 int x, int y, const base::Callback<void(const SkBitmap&)>& callback); | 119 int x, int y, const base::Callback<void(const SkBitmap&)>& callback); |
122 void CapturePixelsAsync( | 120 void CapturePixelsAsync( |
123 const base::Callback<void(const SkBitmap&)>& callback); | 121 const base::Callback<void(const SkBitmap&)>& callback); |
(...skipping 246 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
370 blink::WebTextDirection hint) { | 368 blink::WebTextDirection hint) { |
371 WebTestProxyBase::SetToolTipText(text, hint); | 369 WebTestProxyBase::SetToolTipText(text, hint); |
372 Base::setToolTipText(text, hint); | 370 Base::setToolTipText(text, hint); |
373 } | 371 } |
374 virtual void resetInputMethod() { WebTestProxyBase::ResetInputMethod(); } | 372 virtual void resetInputMethod() { WebTestProxyBase::ResetInputMethod(); } |
375 virtual bool runFileChooser(const blink::WebFileChooserParams& params, | 373 virtual bool runFileChooser(const blink::WebFileChooserParams& params, |
376 blink::WebFileChooserCompletion* completion) { | 374 blink::WebFileChooserCompletion* completion) { |
377 return WebTestProxyBase::RunFileChooser(params, completion); | 375 return WebTestProxyBase::RunFileChooser(params, completion); |
378 } | 376 } |
379 virtual void showValidationMessage(const blink::WebRect& anchor_in_root_view, | 377 virtual void showValidationMessage(const blink::WebRect& anchor_in_root_view, |
380 const blink::WebString& message, | 378 const blink::WebString& main_message, |
| 379 blink::WebTextDirection main_message_hint, |
381 const blink::WebString& sub_message, | 380 const blink::WebString& sub_message, |
382 blink::WebTextDirection hint) { | 381 blink::WebTextDirection sub_message_hint) { |
| 382 base::string16 wrapped_main_text = main_message; |
| 383 base::string16 wrapped_sub_text = sub_message; |
| 384 |
| 385 Base::SetValidationMessageDirection( |
| 386 &wrapped_main_text, main_message_hint, &wrapped_sub_text, sub_message_hi
nt); |
| 387 |
383 WebTestProxyBase::ShowValidationMessage( | 388 WebTestProxyBase::ShowValidationMessage( |
384 anchor_in_root_view, message, sub_message, hint); | 389 wrapped_main_text, wrapped_sub_text); |
385 } | 390 } |
386 virtual void postSpellCheckEvent(const blink::WebString& event_name) { | 391 virtual void postSpellCheckEvent(const blink::WebString& event_name) { |
387 WebTestProxyBase::PostSpellCheckEvent(event_name); | 392 WebTestProxyBase::PostSpellCheckEvent(event_name); |
388 } | 393 } |
389 virtual blink::WebString acceptLanguages() { | 394 virtual blink::WebString acceptLanguages() { |
390 return WebTestProxyBase::acceptLanguages(); | 395 return WebTestProxyBase::acceptLanguages(); |
391 } | 396 } |
392 virtual blink::WebPushClient* webPushClient() { | 397 virtual blink::WebPushClient* webPushClient() { |
393 return WebTestProxyBase::GetWebPushClient(); | 398 return WebTestProxyBase::GetWebPushClient(); |
394 } | 399 } |
395 | 400 |
396 private: | 401 private: |
397 DISALLOW_COPY_AND_ASSIGN(WebTestProxy); | 402 DISALLOW_COPY_AND_ASSIGN(WebTestProxy); |
398 }; | 403 }; |
399 | 404 |
400 } // namespace content | 405 } // namespace content |
401 | 406 |
402 #endif // CONTENT_SHELL_RENDERER_TEST_RUNNER_WEB_TEST_PROXY_H_ | 407 #endif // CONTENT_SHELL_RENDERER_TEST_RUNNER_WEB_TEST_PROXY_H_ |
OLD | NEW |