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

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

Issue 14898004: Bluetooth: set a name for the adapter (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix unit test Created 7 years, 7 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
« no previous file with comments | « no previous file | device/bluetooth/bluetooth_adapter_experimental_chromeos.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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 #ifndef DEVICE_BLUETOOTH_BLUETOOTH_ADAPTER_EXPERIMENTAL_CHROMEOS_H_ 5 #ifndef DEVICE_BLUETOOTH_BLUETOOTH_ADAPTER_EXPERIMENTAL_CHROMEOS_H_
6 #define DEVICE_BLUETOOTH_BLUETOOTH_ADAPTER_EXPERIMENTAL_CHROMEOS_H_ 6 #define DEVICE_BLUETOOTH_BLUETOOTH_ADAPTER_EXPERIMENTAL_CHROMEOS_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/memory/weak_ptr.h" 10 #include "base/memory/weak_ptr.h"
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 88
89 // Internal method used to locate the device object by object path 89 // Internal method used to locate the device object by object path
90 // (the devices map and BluetoothDevice methods are by address) 90 // (the devices map and BluetoothDevice methods are by address)
91 BluetoothDeviceExperimentalChromeOS* GetDeviceWithPath( 91 BluetoothDeviceExperimentalChromeOS* GetDeviceWithPath(
92 const dbus::ObjectPath& object_path); 92 const dbus::ObjectPath& object_path);
93 93
94 // Set the tracked adapter to the one in |object_path|, this object will 94 // Set the tracked adapter to the one in |object_path|, this object will
95 // subsequently operate on that adapter until it is removed. 95 // subsequently operate on that adapter until it is removed.
96 void SetAdapter(const dbus::ObjectPath& object_path); 96 void SetAdapter(const dbus::ObjectPath& object_path);
97 97
98 // Set the adapter name to one chosen from the system information, and method
99 // called by dbus:: on completion of the alias property change.
100 void SetAdapterName();
101 void OnSetAlias(bool success);
102
98 // Remove the currently tracked adapter. IsPresent() will return false after 103 // Remove the currently tracked adapter. IsPresent() will return false after
99 // this is called. 104 // this is called.
100 void RemoveAdapter(); 105 void RemoveAdapter();
101 106
102 // Announce to observers a change in the adapter state. 107 // Announce to observers a change in the adapter state.
103 void PoweredChanged(bool powered); 108 void PoweredChanged(bool powered);
104 void DiscoveringChanged(bool discovering); 109 void DiscoveringChanged(bool discovering);
105 void PresentChanged(bool present); 110 void PresentChanged(bool present);
106 111
107 // Announce to observers a change in device state that is not reflected by 112 // Announce to observers a change in device state that is not reflected by
(...skipping 26 matching lines...) Expand all
134 // Note: This should remain the last member so it'll be destroyed and 139 // Note: This should remain the last member so it'll be destroyed and
135 // invalidate its weak pointers before any other members are destroyed. 140 // invalidate its weak pointers before any other members are destroyed.
136 base::WeakPtrFactory<BluetoothAdapterExperimentalChromeOS> weak_ptr_factory_; 141 base::WeakPtrFactory<BluetoothAdapterExperimentalChromeOS> weak_ptr_factory_;
137 142
138 DISALLOW_COPY_AND_ASSIGN(BluetoothAdapterExperimentalChromeOS); 143 DISALLOW_COPY_AND_ASSIGN(BluetoothAdapterExperimentalChromeOS);
139 }; 144 };
140 145
141 } // namespace chromeos 146 } // namespace chromeos
142 147
143 #endif // DEVICE_BLUETOOTH_BLUETOOTH_ADAPTER_EXPERIMENTAL_CHROMEOS_H_ 148 #endif // DEVICE_BLUETOOTH_BLUETOOTH_ADAPTER_EXPERIMENTAL_CHROMEOS_H_
OLDNEW
« no previous file with comments | « no previous file | device/bluetooth/bluetooth_adapter_experimental_chromeos.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698