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

Side by Side Diff: device/bluetooth/bluetooth_device_chromeos.cc

Issue 183853010: Bluetooth: notify user of incoming pairing requests (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fit nits, add unit tests dep Created 6 years, 9 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "device/bluetooth/bluetooth_device_chromeos.h" 5 #include "device/bluetooth/bluetooth_device_chromeos.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/metrics/histogram.h" 8 #include "base/metrics/histogram.h"
9 #include "base/strings/string_number_conversions.h" 9 #include "base/strings/string_number_conversions.h"
10 #include "base/strings/string_util.h" 10 #include "base/strings/string_util.h"
(...skipping 377 matching lines...) Expand 10 before | Expand all | Expand 10 after
388 388
389 void BluetoothDeviceChromeOS::ClearOutOfBandPairingData( 389 void BluetoothDeviceChromeOS::ClearOutOfBandPairingData(
390 const base::Closure& callback, 390 const base::Closure& callback,
391 const ErrorCallback& error_callback) { 391 const ErrorCallback& error_callback) {
392 // TODO(keybuk): implement 392 // TODO(keybuk): implement
393 error_callback.Run(); 393 error_callback.Run();
394 } 394 }
395 395
396 BluetoothPairingChromeOS* BluetoothDeviceChromeOS::BeginPairing( 396 BluetoothPairingChromeOS* BluetoothDeviceChromeOS::BeginPairing(
397 BluetoothDevice::PairingDelegate* pairing_delegate) { 397 BluetoothDevice::PairingDelegate* pairing_delegate) {
398 DCHECK(!pairing_);
399 pairing_.reset(new BluetoothPairingChromeOS(this, pairing_delegate)); 398 pairing_.reset(new BluetoothPairingChromeOS(this, pairing_delegate));
400 return pairing_.get(); 399 return pairing_.get();
401 } 400 }
402 401
403 void BluetoothDeviceChromeOS::EndPairing() { 402 void BluetoothDeviceChromeOS::EndPairing() {
404 pairing_.reset(); 403 pairing_.reset();
405 } 404 }
406 405
407 BluetoothPairingChromeOS* BluetoothDeviceChromeOS::GetPairing() const { 406 BluetoothPairingChromeOS* BluetoothDeviceChromeOS::GetPairing() const {
408 return pairing_.get(); 407 return pairing_.get();
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after
584 const std::string& error_message) { 583 const std::string& error_message) {
585 BluetoothProfileChromeOS* profile_chromeos = 584 BluetoothProfileChromeOS* profile_chromeos =
586 static_cast<BluetoothProfileChromeOS*>(profile); 585 static_cast<BluetoothProfileChromeOS*>(profile);
587 VLOG(1) << object_path_.value() << ": Profile connection failed: " 586 VLOG(1) << object_path_.value() << ": Profile connection failed: "
588 << profile_chromeos->uuid() << ": " 587 << profile_chromeos->uuid() << ": "
589 << error_name << ": " << error_message; 588 << error_name << ": " << error_message;
590 error_callback.Run(); 589 error_callback.Run();
591 } 590 }
592 591
593 } // namespace chromeos 592 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698