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

Side by Side Diff: chrome/browser/chromeos/input_method/textinput_test_helper.cc

Issue 2227563003: Refactoring button field and its type (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix new instances Created 4 years, 4 months 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 (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
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
OLDNEW
« no previous file with comments | « chrome/browser/chrome_service_worker_browsertest.cc ('k') | chrome/browser/devtools/devtools_sanity_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698