| OLD | NEW | 
|     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  Loading... | 
|   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  Loading... | 
|  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 | 
| OLD | NEW |