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 191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
202 BluetoothDevice* device, | 202 BluetoothDevice* device, |
203 const std::string& pincode) { | 203 const std::string& pincode) { |
204 base::string16 message = l10n_util::GetStringFUTF16( | 204 base::string16 message = l10n_util::GetStringFUTF16( |
205 IDS_ASH_STATUS_TRAY_BLUETOOTH_DISPLAY_PINCODE, | 205 IDS_ASH_STATUS_TRAY_BLUETOOTH_DISPLAY_PINCODE, |
206 device->GetName(), base::UTF8ToUTF16(pincode)); | 206 device->GetName(), base::UTF8ToUTF16(pincode)); |
207 | 207 |
208 NotifyPairing(device, message, false); | 208 NotifyPairing(device, message, false); |
209 } | 209 } |
210 | 210 |
211 void BluetoothNotificationController::DisplayPasskey(BluetoothDevice* device, | 211 void BluetoothNotificationController::DisplayPasskey(BluetoothDevice* device, |
212 uint32 passkey) { | 212 uint32_t passkey) { |
213 base::string16 message = l10n_util::GetStringFUTF16( | 213 base::string16 message = l10n_util::GetStringFUTF16( |
214 IDS_ASH_STATUS_TRAY_BLUETOOTH_DISPLAY_PASSKEY, | 214 IDS_ASH_STATUS_TRAY_BLUETOOTH_DISPLAY_PASSKEY, |
215 device->GetName(), base::UTF8ToUTF16( | 215 device->GetName(), base::UTF8ToUTF16( |
216 base::StringPrintf("%06i", passkey))); | 216 base::StringPrintf("%06i", passkey))); |
217 | 217 |
218 NotifyPairing(device, message, false); | 218 NotifyPairing(device, message, false); |
219 } | 219 } |
220 | 220 |
221 void BluetoothNotificationController::KeysEntered(BluetoothDevice* device, | 221 void BluetoothNotificationController::KeysEntered(BluetoothDevice* device, |
222 uint32 entered) { | 222 uint32_t entered) { |
223 // Ignored since we don't have CSS in the notification to update. | 223 // Ignored since we don't have CSS in the notification to update. |
224 } | 224 } |
225 | 225 |
226 void BluetoothNotificationController::ConfirmPasskey(BluetoothDevice* device, | 226 void BluetoothNotificationController::ConfirmPasskey(BluetoothDevice* device, |
227 uint32 passkey) { | 227 uint32_t passkey) { |
228 base::string16 message = l10n_util::GetStringFUTF16( | 228 base::string16 message = l10n_util::GetStringFUTF16( |
229 IDS_ASH_STATUS_TRAY_BLUETOOTH_CONFIRM_PASSKEY, | 229 IDS_ASH_STATUS_TRAY_BLUETOOTH_CONFIRM_PASSKEY, |
230 device->GetName(), base::UTF8ToUTF16( | 230 device->GetName(), base::UTF8ToUTF16( |
231 base::StringPrintf("%06i", passkey))); | 231 base::StringPrintf("%06i", passkey))); |
232 | 232 |
233 NotifyPairing(device, message, true); | 233 NotifyPairing(device, message, true); |
234 } | 234 } |
235 | 235 |
236 void BluetoothNotificationController::AuthorizePairing( | 236 void BluetoothNotificationController::AuthorizePairing( |
237 BluetoothDevice* device) { | 237 BluetoothDevice* device) { |
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
333 device->GetName()), | 333 device->GetName()), |
334 bundle.GetImageNamed(IDR_AURA_NOTIFICATION_BLUETOOTH), | 334 bundle.GetImageNamed(IDR_AURA_NOTIFICATION_BLUETOOTH), |
335 base::string16() /* display source */, GURL(), | 335 base::string16() /* display source */, GURL(), |
336 message_center::NotifierId(message_center::NotifierId::SYSTEM_COMPONENT, | 336 message_center::NotifierId(message_center::NotifierId::SYSTEM_COMPONENT, |
337 system_notifier::kNotifierBluetooth), | 337 system_notifier::kNotifierBluetooth), |
338 optional, NULL)); | 338 optional, NULL)); |
339 message_center::MessageCenter::Get()->AddNotification(notification.Pass()); | 339 message_center::MessageCenter::Get()->AddNotification(notification.Pass()); |
340 } | 340 } |
341 | 341 |
342 } // namespace ash | 342 } // namespace ash |
OLD | NEW |