OLD | NEW |
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 #ifndef ASH_SYSTEM_CHROMEOS_BLUETOOTH_BLUETOOTH_NOTIFICATION_CONTROLLER_H_ | 5 #ifndef ASH_SYSTEM_CHROMEOS_BLUETOOTH_BLUETOOTH_NOTIFICATION_CONTROLLER_H_ |
6 #define ASH_SYSTEM_CHROMEOS_BLUETOOTH_BLUETOOTH_NOTIFICATION_CONTROLLER_H_ | 6 #define ASH_SYSTEM_CHROMEOS_BLUETOOTH_BLUETOOTH_NOTIFICATION_CONTROLLER_H_ |
7 | 7 |
| 8 #include <stdint.h> |
| 9 |
8 #include <set> | 10 #include <set> |
9 | 11 |
10 #include "ash/ash_export.h" | 12 #include "ash/ash_export.h" |
11 #include "base/basictypes.h" | |
12 #include "base/compiler_specific.h" | 13 #include "base/compiler_specific.h" |
| 14 #include "base/macros.h" |
13 #include "base/memory/ref_counted.h" | 15 #include "base/memory/ref_counted.h" |
14 #include "base/memory/weak_ptr.h" | 16 #include "base/memory/weak_ptr.h" |
15 #include "base/strings/string16.h" | 17 #include "base/strings/string16.h" |
16 #include "device/bluetooth/bluetooth_adapter.h" | 18 #include "device/bluetooth/bluetooth_adapter.h" |
17 #include "device/bluetooth/bluetooth_device.h" | 19 #include "device/bluetooth/bluetooth_device.h" |
18 | 20 |
19 namespace ash { | 21 namespace ash { |
20 | 22 |
21 // The BluetoothNotificationController receives incoming pairing requests from | 23 // The BluetoothNotificationController receives incoming pairing requests from |
22 // the BluetoothAdapter, and notifications of changes to the adapter state and | 24 // the BluetoothAdapter, and notifications of changes to the adapter state and |
(...skipping 14 matching lines...) Expand all Loading... |
37 void DeviceChanged(device::BluetoothAdapter* adapter, | 39 void DeviceChanged(device::BluetoothAdapter* adapter, |
38 device::BluetoothDevice* device) override; | 40 device::BluetoothDevice* device) override; |
39 void DeviceRemoved(device::BluetoothAdapter* adapter, | 41 void DeviceRemoved(device::BluetoothAdapter* adapter, |
40 device::BluetoothDevice* device) override; | 42 device::BluetoothDevice* device) override; |
41 | 43 |
42 // device::BluetoothDevice::PairingDelegate override. | 44 // device::BluetoothDevice::PairingDelegate override. |
43 void RequestPinCode(device::BluetoothDevice* device) override; | 45 void RequestPinCode(device::BluetoothDevice* device) override; |
44 void RequestPasskey(device::BluetoothDevice* device) override; | 46 void RequestPasskey(device::BluetoothDevice* device) override; |
45 void DisplayPinCode(device::BluetoothDevice* device, | 47 void DisplayPinCode(device::BluetoothDevice* device, |
46 const std::string& pincode) override; | 48 const std::string& pincode) override; |
47 void DisplayPasskey(device::BluetoothDevice* device, uint32 passkey) override; | 49 void DisplayPasskey(device::BluetoothDevice* device, |
48 void KeysEntered(device::BluetoothDevice* device, uint32 entered) override; | 50 uint32_t passkey) override; |
49 void ConfirmPasskey(device::BluetoothDevice* device, uint32 passkey) override; | 51 void KeysEntered(device::BluetoothDevice* device, uint32_t entered) override; |
| 52 void ConfirmPasskey(device::BluetoothDevice* device, |
| 53 uint32_t passkey) override; |
50 void AuthorizePairing(device::BluetoothDevice* device) override; | 54 void AuthorizePairing(device::BluetoothDevice* device) override; |
51 | 55 |
52 private: | 56 private: |
53 // Internal method called by BluetoothAdapterFactory to provide the adapter | 57 // Internal method called by BluetoothAdapterFactory to provide the adapter |
54 // object. | 58 // object. |
55 void OnGetAdapter(scoped_refptr<device::BluetoothAdapter> adapter); | 59 void OnGetAdapter(scoped_refptr<device::BluetoothAdapter> adapter); |
56 | 60 |
57 // Presents a notification to the user when the adapter becomes discoverable | 61 // Presents a notification to the user when the adapter becomes discoverable |
58 // to other nearby devices. | 62 // to other nearby devices. |
59 void NotifyAdapterDiscoverable(); | 63 void NotifyAdapterDiscoverable(); |
(...skipping 21 matching lines...) Expand all Loading... |
81 // Note: This should remain the last member so it'll be destroyed and | 85 // Note: This should remain the last member so it'll be destroyed and |
82 // invalidate its weak pointers before any other members are destroyed. | 86 // invalidate its weak pointers before any other members are destroyed. |
83 base::WeakPtrFactory<BluetoothNotificationController> weak_ptr_factory_; | 87 base::WeakPtrFactory<BluetoothNotificationController> weak_ptr_factory_; |
84 | 88 |
85 DISALLOW_COPY_AND_ASSIGN(BluetoothNotificationController); | 89 DISALLOW_COPY_AND_ASSIGN(BluetoothNotificationController); |
86 }; | 90 }; |
87 | 91 |
88 } // namespace ash | 92 } // namespace ash |
89 | 93 |
90 #endif // ASH_SYSTEM_CHROMEOS_BLUETOOTH_BLUETOOTH_NOTIFICATION_CONTROLLER_H_ | 94 #endif // ASH_SYSTEM_CHROMEOS_BLUETOOTH_BLUETOOTH_NOTIFICATION_CONTROLLER_H_ |
OLD | NEW |