Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(289)

Side by Side Diff: components/test_runner/web_widget_test_client.cc

Issue 2333813002: Introduce WebInputMethodController to blink (Closed)
Patch Set: Rebased Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 88
89 bool WebWidgetTestClient::isPointerLocked() { 89 bool WebWidgetTestClient::isPointerLocked() {
90 return view_test_runner()->isPointerLocked(); 90 return view_test_runner()->isPointerLocked();
91 } 91 }
92 92
93 void WebWidgetTestClient::setToolTipText(const blink::WebString& text, 93 void WebWidgetTestClient::setToolTipText(const blink::WebString& text,
94 blink::WebTextDirection direction) { 94 blink::WebTextDirection direction) {
95 test_runner()->setToolTipText(text); 95 test_runner()->setToolTipText(text);
96 } 96 }
97 97
98 void WebWidgetTestClient::resetInputMethod() {
99 // If a composition text exists, then we need to let the browser process
100 // to cancel the input method's ongoing composition session.
101 if (web_widget_test_proxy_base_)
102 web_widget_test_proxy_base_->web_widget()->finishComposingText(
103 blink::WebWidget::KeepSelection);
104 }
105
106 void WebWidgetTestClient::startDragging(blink::WebReferrerPolicy policy, 98 void WebWidgetTestClient::startDragging(blink::WebReferrerPolicy policy,
107 const blink::WebDragData& data, 99 const blink::WebDragData& data,
108 blink::WebDragOperationsMask mask, 100 blink::WebDragOperationsMask mask,
109 const blink::WebImage& image, 101 const blink::WebImage& image,
110 const blink::WebPoint& point) { 102 const blink::WebPoint& point) {
111 test_runner()->setDragImage(image); 103 test_runner()->setDragImage(image);
112 104
113 // When running a test, we need to fake a drag drop operation otherwise 105 // When running a test, we need to fake a drag drop operation otherwise
114 // Windows waits for real mouse events to know when the drag is over. 106 // Windows waits for real mouse events to know when the drag is over.
115 web_widget_test_proxy_base_->event_sender()->DoDragDrop(data, mask); 107 web_widget_test_proxy_base_->event_sender()->DoDragDrop(data, mask);
116 } 108 }
117 109
118 110
119 TestRunnerForSpecificView* WebWidgetTestClient::view_test_runner() { 111 TestRunnerForSpecificView* WebWidgetTestClient::view_test_runner() {
120 return web_widget_test_proxy_base_->web_view_test_proxy_base() 112 return web_widget_test_proxy_base_->web_view_test_proxy_base()
121 ->view_test_runner(); 113 ->view_test_runner();
122 } 114 }
123 115
124 WebTestDelegate* WebWidgetTestClient::delegate() { 116 WebTestDelegate* WebWidgetTestClient::delegate() {
125 return web_widget_test_proxy_base_->web_view_test_proxy_base()->delegate(); 117 return web_widget_test_proxy_base_->web_view_test_proxy_base()->delegate();
126 } 118 }
127 119
128 TestRunner* WebWidgetTestClient::test_runner() { 120 TestRunner* WebWidgetTestClient::test_runner() {
129 return web_widget_test_proxy_base_->web_view_test_proxy_base() 121 return web_widget_test_proxy_base_->web_view_test_proxy_base()
130 ->test_interfaces() 122 ->test_interfaces()
131 ->GetTestRunner(); 123 ->GetTestRunner();
132 } 124 }
133 125
134 } // namespace test_runner 126 } // namespace test_runner
OLDNEW
« no previous file with comments | « components/test_runner/web_widget_test_client.h ('k') | components/test_runner/web_widget_test_proxy.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698