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

Side by Side Diff: device/bluetooth/bluetooth_adapter_chromeos.h

Issue 1100483005: bluetooth: Refactor device/bluetooth for C++ Style: typedef ordering. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: typedefs for all of src/device/bluetooth Created 5 years, 8 months 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/bluetooth/bluetooth_adapter.h ('k') | device/bluetooth/bluetooth_device.h » ('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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 #ifndef DEVICE_BLUETOOTH_BLUETOOTH_ADAPTER_CHROMEOS_H_ 5 #ifndef DEVICE_BLUETOOTH_BLUETOOTH_ADAPTER_CHROMEOS_H_
6 #define DEVICE_BLUETOOTH_BLUETOOTH_ADAPTER_CHROMEOS_H_ 6 #define DEVICE_BLUETOOTH_BLUETOOTH_ADAPTER_CHROMEOS_H_
7 7
8 #include <map> 8 #include <map>
9 #include <queue> 9 #include <queue>
10 #include <string> 10 #include <string>
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after
163 friend class BluetoothChromeOSTest_Shutdown_OnStartDiscoveryError_Test; 163 friend class BluetoothChromeOSTest_Shutdown_OnStartDiscoveryError_Test;
164 friend class BluetoothChromeOSTest_Shutdown_OnStopDiscovery_Test; 164 friend class BluetoothChromeOSTest_Shutdown_OnStopDiscovery_Test;
165 friend class BluetoothChromeOSTest_Shutdown_OnStopDiscoveryError_Test; 165 friend class BluetoothChromeOSTest_Shutdown_OnStopDiscoveryError_Test;
166 166
167 // typedef for callback parameters that are passed to AddDiscoverySession 167 // typedef for callback parameters that are passed to AddDiscoverySession
168 // and RemoveDiscoverySession. This is used to queue incoming requests while 168 // and RemoveDiscoverySession. This is used to queue incoming requests while
169 // a call to BlueZ is pending. 169 // a call to BlueZ is pending.
170 typedef std::pair<base::Closure, ErrorCallback> DiscoveryCallbackPair; 170 typedef std::pair<base::Closure, ErrorCallback> DiscoveryCallbackPair;
171 typedef std::queue<DiscoveryCallbackPair> DiscoveryCallbackQueue; 171 typedef std::queue<DiscoveryCallbackPair> DiscoveryCallbackQueue;
172 172
173 // Callback pair for the profile registration queue.
174 typedef std::pair<base::Closure, ErrorCompletionCallback>
175 RegisterProfileCompletionPair;
176
173 BluetoothAdapterChromeOS(); 177 BluetoothAdapterChromeOS();
174 ~BluetoothAdapterChromeOS() override; 178 ~BluetoothAdapterChromeOS() override;
175 179
176 // BluetoothAdapterClient::Observer override. 180 // BluetoothAdapterClient::Observer override.
177 void AdapterAdded(const dbus::ObjectPath& object_path) override; 181 void AdapterAdded(const dbus::ObjectPath& object_path) override;
178 void AdapterRemoved(const dbus::ObjectPath& object_path) override; 182 void AdapterRemoved(const dbus::ObjectPath& object_path) override;
179 void AdapterPropertyChanged(const dbus::ObjectPath& object_path, 183 void AdapterPropertyChanged(const dbus::ObjectPath& object_path,
180 const std::string& property_name) override; 184 const std::string& property_name) override;
181 185
182 // BluetoothDeviceClient::Observer override. 186 // BluetoothDeviceClient::Observer override.
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after
343 // our own class as its delegate. 347 // our own class as its delegate.
344 scoped_ptr<BluetoothAgentServiceProvider> agent_; 348 scoped_ptr<BluetoothAgentServiceProvider> agent_;
345 349
346 // UI thread task runner and socket thread object used to create sockets. 350 // UI thread task runner and socket thread object used to create sockets.
347 scoped_refptr<base::SequencedTaskRunner> ui_task_runner_; 351 scoped_refptr<base::SequencedTaskRunner> ui_task_runner_;
348 scoped_refptr<device::BluetoothSocketThread> socket_thread_; 352 scoped_refptr<device::BluetoothSocketThread> socket_thread_;
349 353
350 // The profiles we have registered with the bluetooth daemon. 354 // The profiles we have registered with the bluetooth daemon.
351 std::map<device::BluetoothUUID, BluetoothAdapterProfileChromeOS*> profiles_; 355 std::map<device::BluetoothUUID, BluetoothAdapterProfileChromeOS*> profiles_;
352 356
353 // Callback pair for the profile registration queue.
354 typedef std::pair<base::Closure, ErrorCompletionCallback>
355 RegisterProfileCompletionPair;
356
357 // Queue of delegates waiting for a profile to register. 357 // Queue of delegates waiting for a profile to register.
358 std::map<device::BluetoothUUID, std::vector<RegisterProfileCompletionPair>*> 358 std::map<device::BluetoothUUID, std::vector<RegisterProfileCompletionPair>*>
359 profile_queues_; 359 profile_queues_;
360 360
361 // Note: This should remain the last member so it'll be destroyed and 361 // Note: This should remain the last member so it'll be destroyed and
362 // invalidate its weak pointers before any other members are destroyed. 362 // invalidate its weak pointers before any other members are destroyed.
363 base::WeakPtrFactory<BluetoothAdapterChromeOS> weak_ptr_factory_; 363 base::WeakPtrFactory<BluetoothAdapterChromeOS> weak_ptr_factory_;
364 364
365 DISALLOW_COPY_AND_ASSIGN(BluetoothAdapterChromeOS); 365 DISALLOW_COPY_AND_ASSIGN(BluetoothAdapterChromeOS);
366 }; 366 };
367 367
368 } // namespace chromeos 368 } // namespace chromeos
369 369
370 #endif // DEVICE_BLUETOOTH_BLUETOOTH_ADAPTER_CHROMEOS_H_ 370 #endif // DEVICE_BLUETOOTH_BLUETOOTH_ADAPTER_CHROMEOS_H_
OLDNEW
« no previous file with comments | « device/bluetooth/bluetooth_adapter.h ('k') | device/bluetooth/bluetooth_device.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698