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 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
136 | 136 |
137 // In any case, remove this pairing notification. | 137 // In any case, remove this pairing notification. |
138 message_center::MessageCenter::Get()->RemoveNotification( | 138 message_center::MessageCenter::Get()->RemoveNotification( |
139 kBluetoothDevicePairingNotificationId, false /* by_user */); | 139 kBluetoothDevicePairingNotificationId, false /* by_user */); |
140 } | 140 } |
141 | 141 |
142 } // namespace | 142 } // namespace |
143 | 143 |
144 | 144 |
145 namespace ash { | 145 namespace ash { |
146 namespace internal { | |
147 | 146 |
148 BluetoothNotificationController::BluetoothNotificationController() | 147 BluetoothNotificationController::BluetoothNotificationController() |
149 : weak_ptr_factory_(this) { | 148 : weak_ptr_factory_(this) { |
150 BluetoothAdapterFactory::GetAdapter( | 149 BluetoothAdapterFactory::GetAdapter( |
151 base::Bind(&BluetoothNotificationController::OnGetAdapter, | 150 base::Bind(&BluetoothNotificationController::OnGetAdapter, |
152 weak_ptr_factory_.GetWeakPtr())); | 151 weak_ptr_factory_.GetWeakPtr())); |
153 } | 152 } |
154 | 153 |
155 BluetoothNotificationController::~BluetoothNotificationController() { | 154 BluetoothNotificationController::~BluetoothNotificationController() { |
156 if (adapter_.get()) { | 155 if (adapter_.get()) { |
(...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
361 bundle.GetImageNamed(IDR_AURA_UBER_TRAY_BLUETOOTH), | 360 bundle.GetImageNamed(IDR_AURA_UBER_TRAY_BLUETOOTH), |
362 base::string16() /* display source */, | 361 base::string16() /* display source */, |
363 message_center::NotifierId( | 362 message_center::NotifierId( |
364 message_center::NotifierId::SYSTEM_COMPONENT, | 363 message_center::NotifierId::SYSTEM_COMPONENT, |
365 system_notifier::kNotifierBluetooth), | 364 system_notifier::kNotifierBluetooth), |
366 optional, | 365 optional, |
367 NULL)); | 366 NULL)); |
368 message_center::MessageCenter::Get()->AddNotification(notification.Pass()); | 367 message_center::MessageCenter::Get()->AddNotification(notification.Pass()); |
369 } | 368 } |
370 | 369 |
371 } // namespace internal | |
372 } // namespace ash | 370 } // namespace ash |
OLD | NEW |