OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 "chromeos/dbus/bluetooth_le_advertising_manager_client.h" | 5 #include "chromeos/dbus/bluetooth_le_advertising_manager_client.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/logging.h" | 8 #include "base/logging.h" |
9 #include "base/observer_list.h" | 9 #include "base/observer_list.h" |
10 #include "dbus/bus.h" | 10 #include "dbus/bus.h" |
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
158 } else { | 158 } else { |
159 error_name = kNoResponseError; | 159 error_name = kNoResponseError; |
160 error_message = ""; | 160 error_message = ""; |
161 } | 161 } |
162 error_callback.Run(error_name, error_message); | 162 error_callback.Run(error_name, error_message); |
163 } | 163 } |
164 | 164 |
165 dbus::ObjectManager* object_manager_; | 165 dbus::ObjectManager* object_manager_; |
166 | 166 |
167 // List of observers interested in event notifications from us. | 167 // List of observers interested in event notifications from us. |
168 ObserverList<BluetoothLEAdvertisingManagerClient::Observer> observers_; | 168 base::ObserverList<BluetoothLEAdvertisingManagerClient::Observer> observers_; |
169 | 169 |
170 // Weak pointer factory for generating 'this' pointers that might live longer | 170 // Weak pointer factory for generating 'this' pointers that might live longer |
171 // than we do. | 171 // than we do. |
172 // Note: This should remain the last member so it'll be destroyed and | 172 // Note: This should remain the last member so it'll be destroyed and |
173 // invalidate its weak pointers before any other members are destroyed. | 173 // invalidate its weak pointers before any other members are destroyed. |
174 base::WeakPtrFactory<BluetoothAdvertisementManagerClientImpl> | 174 base::WeakPtrFactory<BluetoothAdvertisementManagerClientImpl> |
175 weak_ptr_factory_; | 175 weak_ptr_factory_; |
176 | 176 |
177 DISALLOW_COPY_AND_ASSIGN(BluetoothAdvertisementManagerClientImpl); | 177 DISALLOW_COPY_AND_ASSIGN(BluetoothAdvertisementManagerClientImpl); |
178 }; | 178 }; |
179 | 179 |
180 BluetoothLEAdvertisingManagerClient::BluetoothLEAdvertisingManagerClient() { | 180 BluetoothLEAdvertisingManagerClient::BluetoothLEAdvertisingManagerClient() { |
181 } | 181 } |
182 | 182 |
183 BluetoothLEAdvertisingManagerClient::~BluetoothLEAdvertisingManagerClient() { | 183 BluetoothLEAdvertisingManagerClient::~BluetoothLEAdvertisingManagerClient() { |
184 } | 184 } |
185 | 185 |
186 BluetoothLEAdvertisingManagerClient* | 186 BluetoothLEAdvertisingManagerClient* |
187 BluetoothLEAdvertisingManagerClient::Create() { | 187 BluetoothLEAdvertisingManagerClient::Create() { |
188 return new BluetoothAdvertisementManagerClientImpl(); | 188 return new BluetoothAdvertisementManagerClientImpl(); |
189 } | 189 } |
190 | 190 |
191 } // namespace chromeos | 191 } // namespace chromeos |
OLD | NEW |