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

Side by Side Diff: device/bluetooth/dbus/bluetooth_gatt_manager_client.cc

Issue 1415573014: Reland "Add Linux support for the Bluetooth API" (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: build fix. Created 5 years, 1 month 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "device/bluetooth/dbus/bluetooth_gatt_manager_client.h" 5 #include "device/bluetooth/dbus/bluetooth_gatt_manager_client.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/memory/weak_ptr.h" 8 #include "base/memory/weak_ptr.h"
9 #include "dbus/bus.h" 9 #include "dbus/bus.h"
10 #include "dbus/message.h" 10 #include "dbus/message.h"
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 DCHECK(object_proxy_); 66 DCHECK(object_proxy_);
67 object_proxy_->CallMethodWithErrorCallback( 67 object_proxy_->CallMethodWithErrorCallback(
68 &method_call, dbus::ObjectProxy::TIMEOUT_USE_DEFAULT, 68 &method_call, dbus::ObjectProxy::TIMEOUT_USE_DEFAULT,
69 base::Bind(&BluetoothGattManagerClientImpl::OnSuccess, 69 base::Bind(&BluetoothGattManagerClientImpl::OnSuccess,
70 weak_ptr_factory_.GetWeakPtr(), callback), 70 weak_ptr_factory_.GetWeakPtr(), callback),
71 base::Bind(&BluetoothGattManagerClientImpl::OnError, 71 base::Bind(&BluetoothGattManagerClientImpl::OnError,
72 weak_ptr_factory_.GetWeakPtr(), error_callback)); 72 weak_ptr_factory_.GetWeakPtr(), error_callback));
73 } 73 }
74 74
75 protected: 75 protected:
76 // chromeos::DBusClient override. 76 // bluez::DBusClient override.
77 void Init(dbus::Bus* bus) override { 77 void Init(dbus::Bus* bus) override {
78 DCHECK(bus); 78 DCHECK(bus);
79 object_proxy_ = bus->GetObjectProxy( 79 object_proxy_ = bus->GetObjectProxy(
80 bluetooth_gatt_manager::kBluetoothGattManagerServiceName, 80 bluetooth_gatt_manager::kBluetoothGattManagerServiceName,
81 dbus::ObjectPath( 81 dbus::ObjectPath(
82 bluetooth_gatt_manager::kBluetoothGattManagerInterface)); 82 bluetooth_gatt_manager::kBluetoothGattManagerInterface));
83 } 83 }
84 84
85 private: 85 private:
86 // Called when a response for a successful method call is received. 86 // Called when a response for a successful method call is received.
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
120 BluetoothGattManagerClient::BluetoothGattManagerClient() {} 120 BluetoothGattManagerClient::BluetoothGattManagerClient() {}
121 121
122 BluetoothGattManagerClient::~BluetoothGattManagerClient() {} 122 BluetoothGattManagerClient::~BluetoothGattManagerClient() {}
123 123
124 // static 124 // static
125 BluetoothGattManagerClient* BluetoothGattManagerClient::Create() { 125 BluetoothGattManagerClient* BluetoothGattManagerClient::Create() {
126 return new BluetoothGattManagerClientImpl(); 126 return new BluetoothGattManagerClientImpl();
127 } 127 }
128 128
129 } // namespace bluez 129 } // namespace bluez
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698