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

Side by Side Diff: device/bluetooth/adapter.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
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 <string> 5 #include <string>
6 #include <utility> 6 #include <utility>
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/memory/ptr_util.h" 9 #include "base/memory/ptr_util.h"
10 #include "device/bluetooth/adapter.h" 10 #include "device/bluetooth/adapter.h"
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 if (client_) { 89 if (client_) {
90 auto device_info = Device::ConstructDeviceInfoStruct(device); 90 auto device_info = Device::ConstructDeviceInfoStruct(device);
91 client_->DeviceChanged(std::move(device_info)); 91 client_->DeviceChanged(std::move(device_info));
92 } 92 }
93 } 93 }
94 94
95 void Adapter::OnGattConnected( 95 void Adapter::OnGattConnected(
96 const ConnectToDeviceCallback& callback, 96 const ConnectToDeviceCallback& callback,
97 std::unique_ptr<device::BluetoothGattConnection> connection) { 97 std::unique_ptr<device::BluetoothGattConnection> connection) {
98 mojom::DevicePtr device_ptr; 98 mojom::DevicePtr device_ptr;
99 Device::Create(adapter_, std::move(connection), mojo::GetProxy(&device_ptr)); 99 Device::Create(adapter_, std::move(connection),
100 mojo::MakeRequest(&device_ptr));
100 callback.Run(mojom::ConnectResult::SUCCESS, std::move(device_ptr)); 101 callback.Run(mojom::ConnectResult::SUCCESS, std::move(device_ptr));
101 } 102 }
102 103
103 void Adapter::OnConnectError( 104 void Adapter::OnConnectError(
104 const ConnectToDeviceCallback& callback, 105 const ConnectToDeviceCallback& callback,
105 device::BluetoothDevice::ConnectErrorCode error_code) { 106 device::BluetoothDevice::ConnectErrorCode error_code) {
106 callback.Run(mojo::ConvertTo<mojom::ConnectResult>(error_code), 107 callback.Run(mojo::ConvertTo<mojom::ConnectResult>(error_code),
107 nullptr /* Device */); 108 nullptr /* Device */);
108 } 109 }
109 } // namespace bluetooth 110 } // namespace bluetooth
OLDNEW
« no previous file with comments | « content/shell/renderer/layout_test/blink_test_runner.cc ('k') | device/bluetooth/adapter_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698