OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "chrome/browser/ui/webui/options/chromeos/bluetooth_options_handler.h" | 5 #include "chrome/browser/ui/webui/options/chromeos/bluetooth_options_handler.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/bind_helpers.h" | 8 #include "base/bind_helpers.h" |
9 #include "base/callback.h" | 9 #include "base/callback.h" |
10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
(...skipping 433 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
444 } | 444 } |
445 | 445 |
446 void BluetoothOptionsHandler::DisplayPasskey(device::BluetoothDevice* device, | 446 void BluetoothOptionsHandler::DisplayPasskey(device::BluetoothDevice* device, |
447 uint32 passkey) { | 447 uint32 passkey) { |
448 DictionaryValue params; | 448 DictionaryValue params; |
449 params.SetString("pairing", kRemotePasskey); | 449 params.SetString("pairing", kRemotePasskey); |
450 params.SetInteger("passkey", passkey); | 450 params.SetInteger("passkey", passkey); |
451 SendDeviceNotification(device, ¶ms); | 451 SendDeviceNotification(device, ¶ms); |
452 } | 452 } |
453 | 453 |
| 454 void BluetoothOptionsHandler::KeysEntered(device::BluetoothDevice* device, |
| 455 uint32 entered) { |
| 456 DictionaryValue params; |
| 457 params.SetInteger("entered", entered); |
| 458 SendDeviceNotification(device, ¶ms); |
| 459 } |
| 460 |
454 void BluetoothOptionsHandler::ConfirmPasskey(device::BluetoothDevice* device, | 461 void BluetoothOptionsHandler::ConfirmPasskey(device::BluetoothDevice* device, |
455 uint32 passkey) { | 462 uint32 passkey) { |
456 DictionaryValue params; | 463 DictionaryValue params; |
457 params.SetString("pairing", kConfirmPasskey); | 464 params.SetString("pairing", kConfirmPasskey); |
458 params.SetInteger("passkey", passkey); | 465 params.SetInteger("passkey", passkey); |
459 SendDeviceNotification(device, ¶ms); | 466 SendDeviceNotification(device, ¶ms); |
460 } | 467 } |
461 | 468 |
462 void BluetoothOptionsHandler::DismissDisplayOrConfirm() { | 469 void BluetoothOptionsHandler::DismissDisplayOrConfirm() { |
463 web_ui()->CallJavascriptFunction( | 470 web_ui()->CallJavascriptFunction( |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
503 void BluetoothOptionsHandler::DeviceConnecting( | 510 void BluetoothOptionsHandler::DeviceConnecting( |
504 device::BluetoothDevice* device) { | 511 device::BluetoothDevice* device) { |
505 DCHECK(device); | 512 DCHECK(device); |
506 DictionaryValue params; | 513 DictionaryValue params; |
507 params.SetString("pairing", kStartConnecting); | 514 params.SetString("pairing", kStartConnecting); |
508 SendDeviceNotification(device, ¶ms); | 515 SendDeviceNotification(device, ¶ms); |
509 } | 516 } |
510 | 517 |
511 } // namespace options | 518 } // namespace options |
512 } // namespace chromeos | 519 } // namespace chromeos |
OLD | NEW |