OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 #include "components/test_runner/web_widget_test_client.h" | 5 #include "components/test_runner/web_widget_test_client.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/bind_helpers.h" | 8 #include "base/bind_helpers.h" |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "base/time/time.h" | 10 #include "base/time/time.h" |
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
86 } | 86 } |
87 | 87 |
88 void WebWidgetTestClient::requestPointerUnlock() { | 88 void WebWidgetTestClient::requestPointerUnlock() { |
89 web_test_proxy_base_->view_test_runner()->RequestPointerUnlock(); | 89 web_test_proxy_base_->view_test_runner()->RequestPointerUnlock(); |
90 } | 90 } |
91 | 91 |
92 bool WebWidgetTestClient::isPointerLocked() { | 92 bool WebWidgetTestClient::isPointerLocked() { |
93 return web_test_proxy_base_->view_test_runner()->isPointerLocked(); | 93 return web_test_proxy_base_->view_test_runner()->isPointerLocked(); |
94 } | 94 } |
95 | 95 |
96 void WebWidgetTestClient::didFocus() { | |
97 test_runner_->SetFocus(web_test_proxy_base_->web_view(), true); | |
98 } | |
99 | |
100 void WebWidgetTestClient::setToolTipText(const blink::WebString& text, | 96 void WebWidgetTestClient::setToolTipText(const blink::WebString& text, |
101 blink::WebTextDirection direction) { | 97 blink::WebTextDirection direction) { |
102 test_runner_->setToolTipText(text); | 98 test_runner_->setToolTipText(text); |
103 } | 99 } |
104 | 100 |
105 void WebWidgetTestClient::resetInputMethod() { | 101 void WebWidgetTestClient::resetInputMethod() { |
106 // If a composition text exists, then we need to let the browser process | 102 // If a composition text exists, then we need to let the browser process |
107 // to cancel the input method's ongoing composition session. | 103 // to cancel the input method's ongoing composition session. |
108 if (web_test_proxy_base_) | 104 if (web_test_proxy_base_) |
109 web_test_proxy_base_->web_widget()->confirmComposition(); | 105 web_test_proxy_base_->web_widget()->confirmComposition(); |
110 } | 106 } |
111 | 107 |
112 } // namespace test_runner | 108 } // namespace test_runner |
OLD | NEW |