OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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 #include "ash/shell.h" | 5 #include "ash/shell.h" |
6 #include "base/strings/string_number_conversions.h" | 6 #include "base/strings/string_number_conversions.h" |
7 #include "base/strings/string_split.h" | 7 #include "base/strings/string_split.h" |
8 #include "base/strings/string_util.h" | 8 #include "base/strings/string_util.h" |
9 #include "base/strings/utf_string_conversions.h" | 9 #include "base/strings/utf_string_conversions.h" |
10 #include "chrome/browser/chromeos/input_method/textinput_test_helper.h" | 10 #include "chrome/browser/chromeos/input_method/textinput_test_helper.h" |
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
191 tab, | 191 tab, |
192 "textinput_helper.retrieveElementCoordinate('" + id + "')", | 192 "textinput_helper.retrieveElementCoordinate('" + id + "')", |
193 &coordinate)) | 193 &coordinate)) |
194 return false; | 194 return false; |
195 gfx::Rect rect; | 195 gfx::Rect rect; |
196 if (!ConvertRectFromString(coordinate, &rect)) | 196 if (!ConvertRectFromString(coordinate, &rect)) |
197 return false; | 197 return false; |
198 | 198 |
199 blink::WebMouseEvent mouse_event; | 199 blink::WebMouseEvent mouse_event; |
200 mouse_event.type = blink::WebInputEvent::MouseDown; | 200 mouse_event.type = blink::WebInputEvent::MouseDown; |
201 mouse_event.button = blink::WebMouseEvent::ButtonLeft; | 201 mouse_event.button = blink::WebMouseEvent::Button::Left; |
202 mouse_event.x = rect.CenterPoint().x(); | 202 mouse_event.x = rect.CenterPoint().x(); |
203 mouse_event.y = rect.CenterPoint().y(); | 203 mouse_event.y = rect.CenterPoint().y(); |
204 mouse_event.clickCount = 1; | 204 mouse_event.clickCount = 1; |
205 tab->GetRenderViewHost()->GetWidget()->ForwardMouseEvent(mouse_event); | 205 tab->GetRenderViewHost()->GetWidget()->ForwardMouseEvent(mouse_event); |
206 | 206 |
207 mouse_event.type = blink::WebInputEvent::MouseUp; | 207 mouse_event.type = blink::WebInputEvent::MouseUp; |
208 tab->GetRenderViewHost()->GetWidget()->ForwardMouseEvent(mouse_event); | 208 tab->GetRenderViewHost()->GetWidget()->ForwardMouseEvent(mouse_event); |
209 return true; | 209 return true; |
210 } | 210 } |
211 | 211 |
212 } // namespace chromeos | 212 } // namespace chromeos |
OLD | NEW |