| 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 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 virtual ~BluetoothPairingNotificationDelegate(); |
| 59 | 59 |
| 60 // message_center::NotificationDelegate overrides. | 60 // message_center::NotificationDelegate overrides. |
| 61 virtual void Display() OVERRIDE; | 61 virtual void Display() override; |
| 62 virtual void Error() OVERRIDE; | 62 virtual void Error() override; |
| 63 virtual void Close(bool by_user) OVERRIDE; | 63 virtual void Close(bool by_user) override; |
| 64 virtual bool HasClickedListener() OVERRIDE; | 64 virtual bool HasClickedListener() override; |
| 65 virtual void Click() OVERRIDE; | 65 virtual void Click() override; |
| 66 virtual void ButtonClick(int button_index) OVERRIDE; | 66 virtual void ButtonClick(int button_index) override; |
| 67 | 67 |
| 68 private: | 68 private: |
| 69 // Buttons that appear in notifications. | 69 // Buttons that appear in notifications. |
| 70 enum Button { | 70 enum Button { |
| 71 BUTTON_ACCEPT, | 71 BUTTON_ACCEPT, |
| 72 BUTTON_REJECT | 72 BUTTON_REJECT |
| 73 }; | 73 }; |
| 74 | 74 |
| 75 // Reference to the underlying Bluetooth Adapter, holding onto this | 75 // Reference to the underlying Bluetooth Adapter, holding onto this |
| 76 // reference ensures the adapter object doesn't go out of scope while we have | 76 // reference ensures the adapter object doesn't go out of scope while we have |
| (...skipping 284 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 361 base::string16() /* display source */, | 361 base::string16() /* display source */, |
| 362 message_center::NotifierId( | 362 message_center::NotifierId( |
| 363 message_center::NotifierId::SYSTEM_COMPONENT, | 363 message_center::NotifierId::SYSTEM_COMPONENT, |
| 364 system_notifier::kNotifierBluetooth), | 364 system_notifier::kNotifierBluetooth), |
| 365 optional, | 365 optional, |
| 366 NULL)); | 366 NULL)); |
| 367 message_center::MessageCenter::Get()->AddNotification(notification.Pass()); | 367 message_center::MessageCenter::Get()->AddNotification(notification.Pass()); |
| 368 } | 368 } |
| 369 | 369 |
| 370 } // namespace ash | 370 } // namespace ash |
| OLD | NEW |