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

Side by Side Diff: chrome/browser/chromeos/bluetooth/bluetooth_device.h

Issue 10915148: Change getDevices to use a DeviceCallback. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix test breakage Created 8 years, 3 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 | chrome/browser/chromeos/bluetooth/test/mock_bluetooth_device.h » ('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) 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 CHROME_BROWSER_CHROMEOS_BLUETOOTH_BLUETOOTH_DEVICE_H_ 5 #ifndef CHROME_BROWSER_CHROMEOS_BLUETOOTH_BLUETOOTH_DEVICE_H_
6 #define CHROME_BROWSER_CHROMEOS_BLUETOOTH_BLUETOOTH_DEVICE_H_ 6 #define CHROME_BROWSER_CHROMEOS_BLUETOOTH_BLUETOOTH_DEVICE_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after
194 194
195 // Indicates whether this device provides the given service. |uuid| should 195 // Indicates whether this device provides the given service. |uuid| should
196 // be in canonical form (see bluetooth_utils::CanonicalUuid). 196 // be in canonical form (see bluetooth_utils::CanonicalUuid).
197 virtual bool ProvidesServiceWithUUID(const std::string& uuid) const; 197 virtual bool ProvidesServiceWithUUID(const std::string& uuid) const;
198 198
199 // The ProvidesServiceCallback is used by ProvidesServiceWithName to indicate 199 // The ProvidesServiceCallback is used by ProvidesServiceWithName to indicate
200 // whether or not a matching service was found. 200 // whether or not a matching service was found.
201 typedef base::Callback<void(bool)> ProvidesServiceCallback; 201 typedef base::Callback<void(bool)> ProvidesServiceCallback;
202 202
203 // Indicates whether this device provides the given service. 203 // Indicates whether this device provides the given service.
204 void ProvidesServiceWithName(const std::string& name, 204 virtual void ProvidesServiceWithName(const std::string& name,
205 const ProvidesServiceCallback& callback); 205 const ProvidesServiceCallback& callback);
206 206
207 // Indicates whether the device is currently pairing and expecting a 207 // Indicates whether the device is currently pairing and expecting a
208 // PIN Code to be returned. 208 // PIN Code to be returned.
209 bool ExpectingPinCode() const { return !pincode_callback_.is_null(); } 209 bool ExpectingPinCode() const { return !pincode_callback_.is_null(); }
210 210
211 // Indicates whether the device is currently pairing and expecting a 211 // Indicates whether the device is currently pairing and expecting a
212 // Passkey to be returned. 212 // Passkey to be returned.
213 bool ExpectingPasskey() const { return !passkey_callback_.is_null(); } 213 bool ExpectingPasskey() const { return !passkey_callback_.is_null(); }
214 214
215 // Indicates whether the device is currently pairing and expecting 215 // Indicates whether the device is currently pairing and expecting
(...skipping 389 matching lines...) Expand 10 before | Expand all | Expand 10 after
605 // Note: This should remain the last member so it'll be destroyed and 605 // Note: This should remain the last member so it'll be destroyed and
606 // invalidate its weak pointers before any other members are destroyed. 606 // invalidate its weak pointers before any other members are destroyed.
607 base::WeakPtrFactory<BluetoothDevice> weak_ptr_factory_; 607 base::WeakPtrFactory<BluetoothDevice> weak_ptr_factory_;
608 608
609 DISALLOW_COPY_AND_ASSIGN(BluetoothDevice); 609 DISALLOW_COPY_AND_ASSIGN(BluetoothDevice);
610 }; 610 };
611 611
612 } // namespace chromeos 612 } // namespace chromeos
613 613
614 #endif // CHROME_BROWSER_CHROMEOS_BLUETOOTH_BLUETOOTH_DEVICE_H_ 614 #endif // CHROME_BROWSER_CHROMEOS_BLUETOOTH_BLUETOOTH_DEVICE_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/chromeos/bluetooth/test/mock_bluetooth_device.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698