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

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

Issue 12310048: Bluetooth: Add a "connectable" property to the BluetoothDevice. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Fixed the bug about calling twice the callback. Created 7 years, 10 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 "device/bluetooth/bluetooth_device.h" 5 #include "device/bluetooth/bluetooth_device.h"
6 6
7 #include "base/utf_string_conversions.h" 7 #include "base/utf_string_conversions.h"
8 #include "grit/generated_resources.h" 8 #include "grit/generated_resources.h"
9 #include "ui/base/l10n/l10n_util.h" 9 #include "ui/base/l10n/l10n_util.h"
10 10
11 namespace device { 11 namespace device {
12 12
13 BluetoothDevice::BluetoothDevice() 13 BluetoothDevice::BluetoothDevice()
14 : bluetooth_class_(0), 14 : bluetooth_class_(0),
15 visible_(false), 15 visible_(false),
16 bonded_(false), 16 bonded_(false),
17 connected_(false) { 17 connected_(false),
18 connectable_(true) {
18 } 19 }
19 20
20 BluetoothDevice::~BluetoothDevice() { 21 BluetoothDevice::~BluetoothDevice() {
21 } 22 }
22 23
23 const std::string& BluetoothDevice::address() const { 24 const std::string& BluetoothDevice::address() const {
24 return address_; 25 return address_;
25 } 26 }
26 27
27 string16 BluetoothDevice::GetName() const { 28 string16 BluetoothDevice::GetName() const {
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
160 } 161 }
161 162
162 bool BluetoothDevice::IsBonded() const { 163 bool BluetoothDevice::IsBonded() const {
163 return bonded_; 164 return bonded_;
164 } 165 }
165 166
166 bool BluetoothDevice::IsConnected() const { 167 bool BluetoothDevice::IsConnected() const {
167 return connected_; 168 return connected_;
168 } 169 }
169 170
171 bool BluetoothDevice::IsConnectable() const {
172 return connectable_;
173 }
174
170 } // namespace device 175 } // namespace device
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698