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

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

Issue 2782893002: WebMouseEvent coordinates are now fractional & private (Closed)
Patch Set: Rebased, fixed a comment in web_input_event_builders_mac.mm Created 3 years, 8 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 182 matching lines...) Expand 10 before | Expand all | Expand 10 after
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(blink::WebInputEvent::MouseDown, 199 blink::WebMouseEvent mouse_event(blink::WebInputEvent::MouseDown,
200 blink::WebInputEvent::NoModifiers, 200 blink::WebInputEvent::NoModifiers,
201 blink::WebInputEvent::TimeStampForTesting); 201 blink::WebInputEvent::TimeStampForTesting);
202 mouse_event.button = blink::WebMouseEvent::Button::Left; 202 mouse_event.button = blink::WebMouseEvent::Button::Left;
203 mouse_event.x = rect.CenterPoint().x(); 203 mouse_event.setPositionInWidget(rect.CenterPoint().x(),
204 mouse_event.y = rect.CenterPoint().y(); 204 rect.CenterPoint().y());
205 mouse_event.clickCount = 1; 205 mouse_event.clickCount = 1;
206 tab->GetRenderViewHost()->GetWidget()->ForwardMouseEvent(mouse_event); 206 tab->GetRenderViewHost()->GetWidget()->ForwardMouseEvent(mouse_event);
207 207
208 mouse_event.setType(blink::WebInputEvent::MouseUp); 208 mouse_event.setType(blink::WebInputEvent::MouseUp);
209 tab->GetRenderViewHost()->GetWidget()->ForwardMouseEvent(mouse_event); 209 tab->GetRenderViewHost()->GetWidget()->ForwardMouseEvent(mouse_event);
210 return true; 210 return true;
211 } 211 }
212 212
213 } // namespace chromeos 213 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/apps/guest_view/web_view_interactive_browsertest.cc ('k') | chrome/browser/download/download_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698