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

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

Issue 12929003: Implemented BluetoothAdapterMac::AddDevices(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Changed the format type to unsigned long. Created 7 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 (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 #ifndef DEVICE_BLUETOOTH_BLUETOOTH_DEVICE_CHROMEOS_H_ 5 #ifndef DEVICE_BLUETOOTH_BLUETOOTH_DEVICE_CHROMEOS_H_
6 #define DEVICE_BLUETOOTH_BLUETOOTH_DEVICE_CHROMEOS_H_ 6 #define DEVICE_BLUETOOTH_BLUETOOTH_DEVICE_CHROMEOS_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 explicit BluetoothDeviceChromeOS(BluetoothAdapterChromeOS* adapter); 82 explicit BluetoothDeviceChromeOS(BluetoothAdapterChromeOS* adapter);
83 83
84 // Sets the dbus object path for the device to |object_path|, indicating 84 // Sets the dbus object path for the device to |object_path|, indicating
85 // that the device has gone from being discovered to paired or bonded. 85 // that the device has gone from being discovered to paired or bonded.
86 void SetObjectPath(const dbus::ObjectPath& object_path); 86 void SetObjectPath(const dbus::ObjectPath& object_path);
87 87
88 // Removes the dbus object path from the device, indicating that the 88 // Removes the dbus object path from the device, indicating that the
89 // device is no longer paired or bonded, but perhaps still visible. 89 // device is no longer paired or bonded, but perhaps still visible.
90 void RemoveObjectPath(); 90 void RemoveObjectPath();
91 91
92 // Sets whether the device is visible to the owning adapter to |visible|.
93 void SetVisible(bool visible) { visible_ = visible; }
94
95 // Updates device information from the properties in |properties|, device 92 // Updates device information from the properties in |properties|, device
96 // state properties such as |paired_| and |connected_| are ignored unless 93 // state properties such as |paired_| and |connected_| are ignored unless
97 // |update_state| is true. 94 // |update_state| is true.
98 void Update(const BluetoothDeviceClient::Properties* properties, 95 void Update(const BluetoothDeviceClient::Properties* properties,
99 bool update_state); 96 bool update_state);
100 97
101 // Called by BluetoothAdapterClient when a call to CreateDevice() or 98 // Called by BluetoothAdapterClient when a call to CreateDevice() or
102 // CreatePairedDevice() succeeds, provides the new object path for the remote 99 // CreatePairedDevice() succeeds, provides the new object path for the remote
103 // device in |device_path|. |callback| and |error_callback| are the callbacks 100 // device in |device_path|. |callback| and |error_callback| are the callbacks
104 // provided to Connect(). 101 // provided to Connect().
(...skipping 306 matching lines...) Expand 10 before | Expand all | Expand 10 after
411 // Note: This should remain the last member so it'll be destroyed and 408 // Note: This should remain the last member so it'll be destroyed and
412 // invalidate its weak pointers before any other members are destroyed. 409 // invalidate its weak pointers before any other members are destroyed.
413 base::WeakPtrFactory<BluetoothDeviceChromeOS> weak_ptr_factory_; 410 base::WeakPtrFactory<BluetoothDeviceChromeOS> weak_ptr_factory_;
414 411
415 DISALLOW_COPY_AND_ASSIGN(BluetoothDeviceChromeOS); 412 DISALLOW_COPY_AND_ASSIGN(BluetoothDeviceChromeOS);
416 }; 413 };
417 414
418 } // namespace chromeos 415 } // namespace chromeos
419 416
420 #endif // DEVICE_BLUETOOTH_BLUETOOTH_DEVICE_CHROMEOS_H_ 417 #endif // DEVICE_BLUETOOTH_BLUETOOTH_DEVICE_CHROMEOS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698