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

Side by Side Diff: chrome/browser/android/vr_shell/vr_shell_gl.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 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 "chrome/browser/android/vr_shell/vr_shell_gl.h" 5 #include "chrome/browser/android/vr_shell/vr_shell_gl.h"
6 6
7 #include <chrono> 7 #include <chrono>
8 #include <limits> 8 #include <limits>
9 #include <utility> 9 #include <utility>
10 10
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 return quat; 110 return quat;
111 } 111 }
112 112
113 std::unique_ptr<blink::WebMouseEvent> MakeMouseEvent(WebInputEvent::Type type, 113 std::unique_ptr<blink::WebMouseEvent> MakeMouseEvent(WebInputEvent::Type type,
114 double timestamp, 114 double timestamp,
115 float x, 115 float x,
116 float y) { 116 float y) {
117 std::unique_ptr<blink::WebMouseEvent> mouse_event(new blink::WebMouseEvent( 117 std::unique_ptr<blink::WebMouseEvent> mouse_event(new blink::WebMouseEvent(
118 type, blink::WebInputEvent::NoModifiers, timestamp)); 118 type, blink::WebInputEvent::NoModifiers, timestamp));
119 mouse_event->pointerType = blink::WebPointerProperties::PointerType::Mouse; 119 mouse_event->pointerType = blink::WebPointerProperties::PointerType::Mouse;
120 mouse_event->x = x; 120 mouse_event->setPositionInWidget(x, y);
121 mouse_event->y = y;
122 mouse_event->clickCount = 1; 121 mouse_event->clickCount = 1;
123 122
124 return mouse_event; 123 return mouse_event;
125 } 124 }
126 125
127 enum class ViewerType { 126 enum class ViewerType {
128 UNKNOWN_TYPE = 0, 127 UNKNOWN_TYPE = 0,
129 CARDBOARD = 1, 128 CARDBOARD = 1,
130 DAYDREAM = 2, 129 DAYDREAM = 2,
131 VIEWER_TYPE_MAX, 130 VIEWER_TYPE_MAX,
(...skipping 1165 matching lines...) Expand 10 before | Expand all | Expand 10 after
1297 // appropriate recommended render resolution as the default size during 1296 // appropriate recommended render resolution as the default size during
1298 // InitializeGl. Revisit if the initialization order changes. 1297 // InitializeGl. Revisit if the initialization order changes.
1299 device::mojom::VRDisplayInfoPtr info = VrShell::CreateVRDisplayInfo( 1298 device::mojom::VRDisplayInfoPtr info = VrShell::CreateVRDisplayInfo(
1300 gvr_api_.get(), webvr_surface_size_, device_id); 1299 gvr_api_.get(), webvr_surface_size_, device_id);
1301 main_thread_task_runner_->PostTask( 1300 main_thread_task_runner_->PostTask(
1302 FROM_HERE, 1301 FROM_HERE,
1303 base::Bind(&RunVRDisplayInfoCallback, callback, base::Passed(&info))); 1302 base::Bind(&RunVRDisplayInfoCallback, callback, base::Passed(&info)));
1304 } 1303 }
1305 1304
1306 } // namespace vr_shell 1305 } // namespace vr_shell
OLDNEW
« no previous file with comments | « chrome/browser/android/vr_shell/android_ui_gesture_target.cc ('k') | chrome/browser/apps/guest_view/web_view_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698