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 <set> | 8 #include <set> |
9 | 9 |
10 #include "ash/ash_export.h" | 10 #include "ash/ash_export.h" |
11 #include "base/basictypes.h" | 11 #include "base/basictypes.h" |
12 #include "base/compiler_specific.h" | 12 #include "base/compiler_specific.h" |
13 #include "base/memory/ref_counted.h" | 13 #include "base/memory/ref_counted.h" |
14 #include "base/memory/weak_ptr.h" | 14 #include "base/memory/weak_ptr.h" |
15 #include "base/strings/string16.h" | 15 #include "base/strings/string16.h" |
16 #include "device/bluetooth/bluetooth_adapter.h" | 16 #include "device/bluetooth/bluetooth_adapter.h" |
17 #include "device/bluetooth/bluetooth_device.h" | 17 #include "device/bluetooth/bluetooth_device.h" |
18 | 18 |
19 namespace ash { | 19 namespace ash { |
20 namespace internal { | |
21 | 20 |
22 // The BluetoothNotificationController receives incoming pairing requests from | 21 // The BluetoothNotificationController receives incoming pairing requests from |
23 // the BluetoothAdapter, and notifications of changes to the adapter state and | 22 // the BluetoothAdapter, and notifications of changes to the adapter state and |
24 // set of paired devices. It presents incoming pairing requests in the form of | 23 // set of paired devices. It presents incoming pairing requests in the form of |
25 // rich notifications that the user can interact with to approve the request. | 24 // rich notifications that the user can interact with to approve the request. |
26 class ASH_EXPORT BluetoothNotificationController | 25 class ASH_EXPORT BluetoothNotificationController |
27 : public device::BluetoothAdapter::Observer, | 26 : public device::BluetoothAdapter::Observer, |
28 public device::BluetoothDevice::PairingDelegate { | 27 public device::BluetoothDevice::PairingDelegate { |
29 public: | 28 public: |
30 BluetoothNotificationController(); | 29 BluetoothNotificationController(); |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
82 // filter out property changes for devices that were previously paired. | 81 // filter out property changes for devices that were previously paired. |
83 std::set<std::string> paired_devices_; | 82 std::set<std::string> paired_devices_; |
84 | 83 |
85 // Note: This should remain the last member so it'll be destroyed and | 84 // Note: This should remain the last member so it'll be destroyed and |
86 // invalidate its weak pointers before any other members are destroyed. | 85 // invalidate its weak pointers before any other members are destroyed. |
87 base::WeakPtrFactory<BluetoothNotificationController> weak_ptr_factory_; | 86 base::WeakPtrFactory<BluetoothNotificationController> weak_ptr_factory_; |
88 | 87 |
89 DISALLOW_COPY_AND_ASSIGN(BluetoothNotificationController); | 88 DISALLOW_COPY_AND_ASSIGN(BluetoothNotificationController); |
90 }; | 89 }; |
91 | 90 |
92 } // namespace internal | |
93 } // namespace ash | 91 } // namespace ash |
94 | 92 |
95 #endif // ASH_SYSTEM_CHROMEOS_BLUETOOTH_BLUETOOTH_NOTIFICATION_CONTROLLER_H_ | 93 #endif // ASH_SYSTEM_CHROMEOS_BLUETOOTH_BLUETOOTH_NOTIFICATION_CONTROLLER_H_ |
OLD | NEW |