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

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: fixed wrong check made twice 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 433 matching lines...) Expand 10 before | Expand all | Expand 10 after
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, &params); 451 SendDeviceNotification(device, &params);
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, &params);
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, &params); 466 SendDeviceNotification(device, &params);
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
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, &params); 515 SendDeviceNotification(device, &params);
509 } 516 }
510 517
511 } // namespace options 518 } // namespace options
512 } // namespace chromeos 519 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/options/chromeos/bluetooth_options_handler.h ('k') | device/bluetooth/bluetooth_device.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698