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

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

Issue 13224004: Bluetooth: remove private members from BluetoothAdapter (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Review comments 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 | Annotate | Revision Log
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 "device/bluetooth/bluetooth_adapter_chromeos.h" 5 #include "device/bluetooth/bluetooth_adapter_chromeos.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 DCHECK(observer); 58 DCHECK(observer);
59 observers_.AddObserver(observer); 59 observers_.AddObserver(observer);
60 } 60 }
61 61
62 void BluetoothAdapterChromeOS::RemoveObserver( 62 void BluetoothAdapterChromeOS::RemoveObserver(
63 BluetoothAdapter::Observer* observer) { 63 BluetoothAdapter::Observer* observer) {
64 DCHECK(observer); 64 DCHECK(observer);
65 observers_.RemoveObserver(observer); 65 observers_.RemoveObserver(observer);
66 } 66 }
67 67
68 std::string BluetoothAdapterChromeOS::address() const {
69 return address_;
70 }
71
72 std::string BluetoothAdapterChromeOS::name() const {
73 return name_;
74 }
75
68 // TODO(youngki) Return true when object path and properties of the adapter are 76 // TODO(youngki) Return true when object path and properties of the adapter are
69 // initialized. 77 // initialized.
70 bool BluetoothAdapterChromeOS::IsInitialized() const { 78 bool BluetoothAdapterChromeOS::IsInitialized() const {
71 return true; 79 return true;
72 } 80 }
73 81
74 bool BluetoothAdapterChromeOS::IsPresent() const { 82 bool BluetoothAdapterChromeOS::IsPresent() const {
75 return !object_path_.value().empty() && !address_.empty(); 83 return !object_path_.value().empty() && !address_.empty();
76 } 84 }
77 85
(...skipping 435 matching lines...) Expand 10 before | Expand all | Expand 10 after
513 VLOG(1) << "Paired device " << device->address() 521 VLOG(1) << "Paired device " << device->address()
514 << " is no longer visible to the adapter"; 522 << " is no longer visible to the adapter";
515 device->SetVisible(false); 523 device->SetVisible(false);
516 524
517 FOR_EACH_OBSERVER(BluetoothAdapter::Observer, observers_, 525 FOR_EACH_OBSERVER(BluetoothAdapter::Observer, observers_,
518 DeviceChanged(this, device)); 526 DeviceChanged(this, device));
519 } 527 }
520 } 528 }
521 529
522 } // namespace chromeos 530 } // namespace chromeos
OLDNEW
« no previous file with comments | « device/bluetooth/bluetooth_adapter_chromeos.h ('k') | device/bluetooth/bluetooth_adapter_chromeos_experimental.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698