| 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 <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "ash/system/system_notifier.h" | 9 #include "ash/system/system_notifier.h" |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 124 kBluetoothDevicePairingNotificationId, false /* by_user */); | 124 kBluetoothDevicePairingNotificationId, false /* by_user */); |
| 125 } | 125 } |
| 126 | 126 |
| 127 } // namespace | 127 } // namespace |
| 128 | 128 |
| 129 | 129 |
| 130 namespace ash { | 130 namespace ash { |
| 131 | 131 |
| 132 BluetoothNotificationController::BluetoothNotificationController() | 132 BluetoothNotificationController::BluetoothNotificationController() |
| 133 : weak_ptr_factory_(this) { | 133 : weak_ptr_factory_(this) { |
| 134 #if 0 |
| 134 BluetoothAdapterFactory::GetAdapter( | 135 BluetoothAdapterFactory::GetAdapter( |
| 135 base::Bind(&BluetoothNotificationController::OnGetAdapter, | 136 base::Bind(&BluetoothNotificationController::OnGetAdapter, |
| 136 weak_ptr_factory_.GetWeakPtr())); | 137 weak_ptr_factory_.GetWeakPtr())); |
| 138 #endif |
| 137 } | 139 } |
| 138 | 140 |
| 139 BluetoothNotificationController::~BluetoothNotificationController() { | 141 BluetoothNotificationController::~BluetoothNotificationController() { |
| 140 if (adapter_.get()) { | 142 if (adapter_.get()) { |
| 141 adapter_->RemoveObserver(this); | 143 adapter_->RemoveObserver(this); |
| 142 adapter_->RemovePairingDelegate(this); | 144 adapter_->RemovePairingDelegate(this); |
| 143 adapter_ = NULL; | 145 adapter_ = NULL; |
| 144 } | 146 } |
| 145 } | 147 } |
| 146 | 148 |
| (...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 338 bundle.GetImageNamed(IDR_AURA_NOTIFICATION_BLUETOOTH), | 340 bundle.GetImageNamed(IDR_AURA_NOTIFICATION_BLUETOOTH), |
| 339 base::string16() /* display source */, GURL(), | 341 base::string16() /* display source */, GURL(), |
| 340 message_center::NotifierId(message_center::NotifierId::SYSTEM_COMPONENT, | 342 message_center::NotifierId(message_center::NotifierId::SYSTEM_COMPONENT, |
| 341 system_notifier::kNotifierBluetooth), | 343 system_notifier::kNotifierBluetooth), |
| 342 optional, NULL)); | 344 optional, NULL)); |
| 343 message_center::MessageCenter::Get()->AddNotification( | 345 message_center::MessageCenter::Get()->AddNotification( |
| 344 std::move(notification)); | 346 std::move(notification)); |
| 345 } | 347 } |
| 346 | 348 |
| 347 } // namespace ash | 349 } // namespace ash |
| OLD | NEW |