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

Unified Diff: components/proximity_auth/connection_finder.h

Issue 633253002: [Easy Unlock] Port the BluetoothConnectionFinder class to native code. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add a missing #include Created 6 years, 2 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
Index: components/proximity_auth/connection_finder.h
diff --git a/components/proximity_auth/connection_finder.h b/components/proximity_auth/connection_finder.h
new file mode 100644
index 0000000000000000000000000000000000000000..51292da55438b3c093082b125bd01e1ef29ac474
--- /dev/null
+++ b/components/proximity_auth/connection_finder.h
@@ -0,0 +1,37 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef COMPONENTS_PROXIMITY_AUTH_CONNECTION_FINDER_H
+#define COMPONENTS_PROXIMITY_AUTH_CONNECTION_FINDER_H
+
+#include "base/callback_forward.h"
+#include "base/macros.h"
+#include "base/memory/scoped_ptr.h"
+
+namespace proximity_auth {
+
+class Connection;
+
+// Interface for finding a connection to a remote device.
+class ConnectionFinder {
+ public:
+ ConnectionFinder() {}
+ virtual ~ConnectionFinder() {}
+
+ // Attempts to find a connection to a remote device. The finder will try to
+ // find the connection indefinitely until the finder is destroyed. Calls
+ // |connection_callback| with the open connection once the remote device is
+ // connected.
+ // TODO(isherman): Can this just be done as part of the constructor?
+ typedef base::Callback<void(scoped_ptr<Connection> connection)>
+ ConnectionCallback;
+ virtual void Find(const ConnectionCallback& connection_callback) = 0;
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(ConnectionFinder);
+};
+
+} // namespace proximity_auth
+
+#endif // COMPONENTS_PROXIMITY_AUTH_CONNECTION_FINDER_H
« no previous file with comments | « components/proximity_auth/bluetooth_connection_finder_unittest.cc ('k') | components/proximity_auth/connection_observer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698