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

Side by Side Diff: device/bluetooth/dbus/bluetooth_gatt_service_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_service_client.h" 5 #include "device/bluetooth/dbus/bluetooth_gatt_service_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 "base/observer_list.h" 9 #include "base/observer_list.h"
10 #include "dbus/bus.h" 10 #include "dbus/bus.h"
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 88
89 // dbus::ObjectManager::Interface override. 89 // dbus::ObjectManager::Interface override.
90 void ObjectRemoved(const dbus::ObjectPath& object_path, 90 void ObjectRemoved(const dbus::ObjectPath& object_path,
91 const std::string& interface_name) override { 91 const std::string& interface_name) override {
92 VLOG(2) << "Remote GATT service removed: " << object_path.value(); 92 VLOG(2) << "Remote GATT service removed: " << object_path.value();
93 FOR_EACH_OBSERVER(BluetoothGattServiceClient::Observer, observers_, 93 FOR_EACH_OBSERVER(BluetoothGattServiceClient::Observer, observers_,
94 GattServiceRemoved(object_path)); 94 GattServiceRemoved(object_path));
95 } 95 }
96 96
97 protected: 97 protected:
98 // chromeos::DBusClient override. 98 // bluez::DBusClient override.
99 void Init(dbus::Bus* bus) override { 99 void Init(dbus::Bus* bus) override {
100 object_manager_ = bus->GetObjectManager( 100 object_manager_ = bus->GetObjectManager(
101 bluetooth_object_manager::kBluetoothObjectManagerServiceName, 101 bluetooth_object_manager::kBluetoothObjectManagerServiceName,
102 dbus::ObjectPath( 102 dbus::ObjectPath(
103 bluetooth_object_manager::kBluetoothObjectManagerServicePath)); 103 bluetooth_object_manager::kBluetoothObjectManagerServicePath));
104 object_manager_->RegisterInterface( 104 object_manager_->RegisterInterface(
105 bluetooth_gatt_service::kBluetoothGattServiceInterface, this); 105 bluetooth_gatt_service::kBluetoothGattServiceInterface, this);
106 } 106 }
107 107
108 private: 108 private:
(...skipping 25 matching lines...) Expand all
134 BluetoothGattServiceClient::BluetoothGattServiceClient() {} 134 BluetoothGattServiceClient::BluetoothGattServiceClient() {}
135 135
136 BluetoothGattServiceClient::~BluetoothGattServiceClient() {} 136 BluetoothGattServiceClient::~BluetoothGattServiceClient() {}
137 137
138 // static 138 // static
139 BluetoothGattServiceClient* BluetoothGattServiceClient::Create() { 139 BluetoothGattServiceClient* BluetoothGattServiceClient::Create() {
140 return new BluetoothGattServiceClientImpl(); 140 return new BluetoothGattServiceClientImpl();
141 } 141 }
142 142
143 } // namespace bluez 143 } // namespace bluez
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698