Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(346)

Side by Side Diff: chrome/browser/ui/webui/options/chromeos/bluetooth_options_handler.cc

Issue 13870020: Bluetooth: Add support for pairing display notifications (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: nits Created 7 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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, &params); 445 SendDeviceNotification(device, &params);
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, &params);
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, &params); 461 SendDeviceNotification(device, &params);
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
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, &params); 510 SendDeviceNotification(device, &params);
503 } 511 }
504 512
505 } // namespace options 513 } // namespace options
506 } // namespace chromeos 514 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698