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 #include "ash/system/chromeos/bluetooth/bluetooth_notification_controller.h" | 5 #include "ash/system/chromeos/bluetooth/bluetooth_notification_controller.h" |
6 | 6 |
7 #include "ash/system/system_notifier.h" | 7 #include "ash/system/system_notifier.h" |
8 #include "base/bind.h" | 8 #include "base/bind.h" |
9 #include "base/callback.h" | 9 #include "base/callback.h" |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
48 // The BluetoothPairingNotificationDelegate handles user interaction with the | 48 // The BluetoothPairingNotificationDelegate handles user interaction with the |
49 // pairing notification and sending the confirmation, rejection or cancellation | 49 // pairing notification and sending the confirmation, rejection or cancellation |
50 // back to the underlying device. | 50 // back to the underlying device. |
51 class BluetoothPairingNotificationDelegate | 51 class BluetoothPairingNotificationDelegate |
52 : public message_center::NotificationDelegate { | 52 : public message_center::NotificationDelegate { |
53 public: | 53 public: |
54 BluetoothPairingNotificationDelegate(scoped_refptr<BluetoothAdapter> adapter, | 54 BluetoothPairingNotificationDelegate(scoped_refptr<BluetoothAdapter> adapter, |
55 const std::string& address); | 55 const std::string& address); |
56 | 56 |
57 protected: | 57 protected: |
58 virtual ~BluetoothPairingNotificationDelegate(); | 58 ~BluetoothPairingNotificationDelegate() override; |
59 | 59 |
60 // message_center::NotificationDelegate overrides. | 60 // message_center::NotificationDelegate overrides. |
61 void Close(bool by_user) override; | 61 void Close(bool by_user) override; |
62 void ButtonClick(int button_index) override; | 62 void ButtonClick(int button_index) override; |
63 | 63 |
64 private: | 64 private: |
65 // Buttons that appear in notifications. | 65 // Buttons that appear in notifications. |
66 enum Button { | 66 enum Button { |
67 BUTTON_ACCEPT, | 67 BUTTON_ACCEPT, |
68 BUTTON_REJECT | 68 BUTTON_REJECT |
(...skipping 275 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
344 base::string16() /* display source */, | 344 base::string16() /* display source */, |
345 message_center::NotifierId( | 345 message_center::NotifierId( |
346 message_center::NotifierId::SYSTEM_COMPONENT, | 346 message_center::NotifierId::SYSTEM_COMPONENT, |
347 system_notifier::kNotifierBluetooth), | 347 system_notifier::kNotifierBluetooth), |
348 optional, | 348 optional, |
349 NULL)); | 349 NULL)); |
350 message_center::MessageCenter::Get()->AddNotification(notification.Pass()); | 350 message_center::MessageCenter::Get()->AddNotification(notification.Pass()); |
351 } | 351 } |
352 | 352 |
353 } // namespace ash | 353 } // namespace ash |
OLD | NEW |