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

Side by Side Diff: device/vr/vr_display_impl.cc

Issue 2589663003: mojo:: Rename mojo::GetProxy() to mojo::MakeRequest() (Closed)
Patch Set: Rebase Created 4 years 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
« no previous file with comments | « device/vr/vr_device_manager_unittest.cc ('k') | device/vr/vr_display_impl_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 <utility> 5 #include <utility>
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "device/vr/vr_device.h" 8 #include "device/vr/vr_device.h"
9 #include "device/vr/vr_service_impl.h" 9 #include "device/vr/vr_service_impl.h"
10 10
11 namespace device { 11 namespace device {
12 12
13 VRDisplayImpl::VRDisplayImpl(device::VRDevice* device, VRServiceImpl* service) 13 VRDisplayImpl::VRDisplayImpl(device::VRDevice* device, VRServiceImpl* service)
14 : binding_(this), 14 : binding_(this),
15 device_(device), 15 device_(device),
16 service_(service), 16 service_(service),
17 weak_ptr_factory_(this) { 17 weak_ptr_factory_(this) {
18 mojom::VRDisplayInfoPtr display_info = device->GetVRDevice(); 18 mojom::VRDisplayInfoPtr display_info = device->GetVRDevice();
19 if (service->client()) { 19 if (service->client()) {
20 service->client()->OnDisplayConnected(binding_.CreateInterfacePtrAndBind(), 20 service->client()->OnDisplayConnected(binding_.CreateInterfacePtrAndBind(),
21 mojo::GetProxy(&client_), 21 mojo::MakeRequest(&client_),
22 std::move(display_info)); 22 std::move(display_info));
23 } 23 }
24 } 24 }
25 25
26 VRDisplayImpl::~VRDisplayImpl() { 26 VRDisplayImpl::~VRDisplayImpl() {
27 device_->RemoveDisplay(this); 27 device_->RemoveDisplay(this);
28 } 28 }
29 29
30 void VRDisplayImpl::GetPose(const GetPoseCallback& callback) { 30 void VRDisplayImpl::GetPose(const GetPoseCallback& callback) {
31 if (!device_->IsAccessAllowed(this)) { 31 if (!device_->IsAccessAllowed(this)) {
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 } 77 }
78 78
79 void VRDisplayImpl::UpdateLayerBounds(mojom::VRLayerBoundsPtr left_bounds, 79 void VRDisplayImpl::UpdateLayerBounds(mojom::VRLayerBoundsPtr left_bounds,
80 mojom::VRLayerBoundsPtr right_bounds) { 80 mojom::VRLayerBoundsPtr right_bounds) {
81 if (!device_->IsAccessAllowed(this)) 81 if (!device_->IsAccessAllowed(this))
82 return; 82 return;
83 83
84 device_->UpdateLayerBounds(std::move(left_bounds), std::move(right_bounds)); 84 device_->UpdateLayerBounds(std::move(left_bounds), std::move(right_bounds));
85 } 85 }
86 } 86 }
OLDNEW
« no previous file with comments | « device/vr/vr_device_manager_unittest.cc ('k') | device/vr/vr_display_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698