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

Unified Diff: device/bluetooth/bluetooth_discovery_session.h

Issue 184953002: Migrate Chrome OS Bluetooth UI to the new discovery API. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addressed comments by derat@ and keybuk@. Created 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « device/bluetooth/bluetooth_chromeos_unittest.cc ('k') | device/bluetooth/bluetooth_discovery_session.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: device/bluetooth/bluetooth_discovery_session.h
diff --git a/device/bluetooth/bluetooth_discovery_session.h b/device/bluetooth/bluetooth_discovery_session.h
index 72bdb3006399b4b451d54d5a9f1db7a83170031d..bc2f89305cefb5c768baecb21fc829c45ac3c0fc 100644
--- a/device/bluetooth/bluetooth_discovery_session.h
+++ b/device/bluetooth/bluetooth_discovery_session.h
@@ -36,7 +36,7 @@ class BluetoothDiscoverySession {
// the call may not always succeed. To be notified of such failures,
// users are highly encouraged to call BluetoothDiscoverySession::Stop,
// instead of relying on the destructor.
- ~BluetoothDiscoverySession();
+ virtual ~BluetoothDiscoverySession();
// Returns true if the session is active, false otherwise. If false, the
// adapter might still be discovering as there might still be other active
@@ -44,7 +44,7 @@ class BluetoothDiscoverySession {
// whether or not discovery should continue. In this case, the application
// should request a new BluetoothDiscoverySession to make sure that device
// discovery continues.
- bool active() const { return active_; }
+ virtual bool IsActive() const;
// Requests this discovery session instance to stop. If this instance is
// active, the session will stop. On success, |callback| is called and
@@ -54,13 +54,14 @@ class BluetoothDiscoverySession {
// to call this method to end a discovery session, instead of relying on the
// destructor, so that they can be notified of the result via the callback
// arguments.
- void Stop(const base::Closure& callback,
- const ErrorCallback& error_callback);
+ virtual void Stop(const base::Closure& callback,
+ const ErrorCallback& error_callback);
- private:
+ protected:
friend class BluetoothAdapter;
explicit BluetoothDiscoverySession(BluetoothAdapter* adapter);
+ private:
// Internal callback invoked when a call to Stop has succeeded.
void OnStop(const base::Closure& callback);
« no previous file with comments | « device/bluetooth/bluetooth_chromeos_unittest.cc ('k') | device/bluetooth/bluetooth_discovery_session.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698