| 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 427 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 438 } | 438 } |
| 439 | 439 |
| 440 void BluetoothOptionsHandler::DisplayPasskey(device::BluetoothDevice* device, | 440 void BluetoothOptionsHandler::DisplayPasskey(device::BluetoothDevice* device, |
| 441 uint32 passkey) { | 441 uint32 passkey) { |
| 442 DictionaryValue params; | 442 DictionaryValue params; |
| 443 params.SetString("pairing", kRemotePasskey); | 443 params.SetString("pairing", kRemotePasskey); |
| 444 params.SetInteger("passkey", passkey); | 444 params.SetInteger("passkey", passkey); |
| 445 SendDeviceNotification(device, ¶ms); | 445 SendDeviceNotification(device, ¶ms); |
| 446 } | 446 } |
| 447 | 447 |
| 448 void BluetoothOptionsHandler::DisplayEnteredKeys( |
| 449 device::BluetoothDevice* device, |
| 450 uint32 entered) { |
| 451 DictionaryValue params; |
| 452 params.SetInteger("entered", entered); |
| 453 SendDeviceNotification(device, ¶ms); |
| 454 } |
| 455 |
| 448 void BluetoothOptionsHandler::ConfirmPasskey(device::BluetoothDevice* device, | 456 void BluetoothOptionsHandler::ConfirmPasskey(device::BluetoothDevice* device, |
| 449 uint32 passkey) { | 457 uint32 passkey) { |
| 450 DictionaryValue params; | 458 DictionaryValue params; |
| 451 params.SetString("pairing", kConfirmPasskey); | 459 params.SetString("pairing", kConfirmPasskey); |
| 452 params.SetInteger("passkey", passkey); | 460 params.SetInteger("passkey", passkey); |
| 453 SendDeviceNotification(device, ¶ms); | 461 SendDeviceNotification(device, ¶ms); |
| 454 } | 462 } |
| 455 | 463 |
| 456 void BluetoothOptionsHandler::DismissDisplayOrConfirm() { | 464 void BluetoothOptionsHandler::DismissDisplayOrConfirm() { |
| 457 web_ui()->CallJavascriptFunction( | 465 web_ui()->CallJavascriptFunction( |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 497 void BluetoothOptionsHandler::DeviceConnecting( | 505 void BluetoothOptionsHandler::DeviceConnecting( |
| 498 device::BluetoothDevice* device) { | 506 device::BluetoothDevice* device) { |
| 499 DCHECK(device); | 507 DCHECK(device); |
| 500 DictionaryValue params; | 508 DictionaryValue params; |
| 501 params.SetString("pairing", kStartConnecting); | 509 params.SetString("pairing", kStartConnecting); |
| 502 SendDeviceNotification(device, ¶ms); | 510 SendDeviceNotification(device, ¶ms); |
| 503 } | 511 } |
| 504 | 512 |
| 505 } // namespace options | 513 } // namespace options |
| 506 } // namespace chromeos | 514 } // namespace chromeos |
| OLD | NEW |