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

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

Issue 13872017: Bluetooth: gather usage metrics (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase since Cellular.* appeared under us Created 7 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 | Annotate | Revision Log
« no previous file with comments | « device/bluetooth/bluetooth_device.h ('k') | device/bluetooth/bluetooth_device_chromeos.cc » ('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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_DEVICE_CHROMEOS_H_ 5 #ifndef DEVICE_BLUETOOTH_BLUETOOTH_DEVICE_CHROMEOS_H_
6 #define DEVICE_BLUETOOTH_BLUETOOTH_DEVICE_CHROMEOS_H_ 6 #define DEVICE_BLUETOOTH_BLUETOOTH_DEVICE_CHROMEOS_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 22 matching lines...) Expand all
33 // The BluetoothDeviceChromeOS class is an implementation of BluetoothDevice 33 // The BluetoothDeviceChromeOS class is an implementation of BluetoothDevice
34 // for Chrome OS platform. 34 // for Chrome OS platform.
35 class BluetoothDeviceChromeOS 35 class BluetoothDeviceChromeOS
36 : public device::BluetoothDevice, 36 : public device::BluetoothDevice,
37 public BluetoothDeviceClient::Observer, 37 public BluetoothDeviceClient::Observer,
38 public BluetoothAgentServiceProvider::Delegate { 38 public BluetoothAgentServiceProvider::Delegate {
39 public: 39 public:
40 virtual ~BluetoothDeviceChromeOS(); 40 virtual ~BluetoothDeviceChromeOS();
41 41
42 // BluetoothDevice override 42 // BluetoothDevice override
43 virtual uint32 GetBluetoothClass() const OVERRIDE;
43 virtual std::string GetAddress() const OVERRIDE; 44 virtual std::string GetAddress() const OVERRIDE;
45 virtual uint16 GetVendorID() const OVERRIDE;
46 virtual uint16 GetProductID() const OVERRIDE;
47 virtual uint16 GetDeviceID() const OVERRIDE;
44 virtual bool IsPaired() const OVERRIDE; 48 virtual bool IsPaired() const OVERRIDE;
45 virtual bool IsConnected() const OVERRIDE; 49 virtual bool IsConnected() const OVERRIDE;
46 virtual bool IsConnectable() const OVERRIDE; 50 virtual bool IsConnectable() const OVERRIDE;
47 virtual bool IsConnecting() const OVERRIDE; 51 virtual bool IsConnecting() const OVERRIDE;
48 virtual ServiceList GetServices() const OVERRIDE; 52 virtual ServiceList GetServices() const OVERRIDE;
49 virtual void GetServiceRecords( 53 virtual void GetServiceRecords(
50 const ServiceRecordsCallback& callback, 54 const ServiceRecordsCallback& callback,
51 const ErrorCallback& error_callback) OVERRIDE; 55 const ErrorCallback& error_callback) OVERRIDE;
52 virtual void ProvidesServiceWithName( 56 virtual void ProvidesServiceWithName(
53 const std::string& name, 57 const std::string& name,
(...skipping 24 matching lines...) Expand all
78 virtual void SetOutOfBandPairingData( 82 virtual void SetOutOfBandPairingData(
79 const device::BluetoothOutOfBandPairingData& data, 83 const device::BluetoothOutOfBandPairingData& data,
80 const base::Closure& callback, 84 const base::Closure& callback,
81 const ErrorCallback& error_callback) OVERRIDE; 85 const ErrorCallback& error_callback) OVERRIDE;
82 virtual void ClearOutOfBandPairingData( 86 virtual void ClearOutOfBandPairingData(
83 const base::Closure& callback, 87 const base::Closure& callback,
84 const ErrorCallback& error_callback) OVERRIDE; 88 const ErrorCallback& error_callback) OVERRIDE;
85 89
86 protected: 90 protected:
87 // BluetoothDevice override 91 // BluetoothDevice override
88 virtual uint32 GetBluetoothClass() const OVERRIDE;
89 virtual std::string GetDeviceName() const OVERRIDE; 92 virtual std::string GetDeviceName() const OVERRIDE;
90 93
91 private: 94 private:
92 friend class BluetoothAdapterChromeOS; 95 friend class BluetoothAdapterChromeOS;
93 friend class device::MockBluetoothDevice; 96 friend class device::MockBluetoothDevice;
94 97
95 explicit BluetoothDeviceChromeOS(BluetoothAdapterChromeOS* adapter); 98 explicit BluetoothDeviceChromeOS(BluetoothAdapterChromeOS* adapter);
96 99
97 // Returns whether this device has an object path. 100 // Returns whether this device has an object path.
98 bool HasObjectPath() const { return !object_path_.value().empty(); } 101 bool HasObjectPath() const { return !object_path_.value().empty(); }
(...skipping 355 matching lines...) Expand 10 before | Expand all | Expand 10 after
454 // Note: This should remain the last member so it'll be destroyed and 457 // Note: This should remain the last member so it'll be destroyed and
455 // invalidate its weak pointers before any other members are destroyed. 458 // invalidate its weak pointers before any other members are destroyed.
456 base::WeakPtrFactory<BluetoothDeviceChromeOS> weak_ptr_factory_; 459 base::WeakPtrFactory<BluetoothDeviceChromeOS> weak_ptr_factory_;
457 460
458 DISALLOW_COPY_AND_ASSIGN(BluetoothDeviceChromeOS); 461 DISALLOW_COPY_AND_ASSIGN(BluetoothDeviceChromeOS);
459 }; 462 };
460 463
461 } // namespace chromeos 464 } // namespace chromeos
462 465
463 #endif // DEVICE_BLUETOOTH_BLUETOOTH_DEVICE_CHROMEOS_H_ 466 #endif // DEVICE_BLUETOOTH_BLUETOOTH_DEVICE_CHROMEOS_H_
OLDNEW
« no previous file with comments | « device/bluetooth/bluetooth_device.h ('k') | device/bluetooth/bluetooth_device_chromeos.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698