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

Unified Diff: components/proximity_auth/proximity_auth_client.h

Issue 1096293003: Move screenlock_bridge to components/proximity_auth (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 5 years, 8 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/proximity_auth_client.h
diff --git a/components/proximity_auth/proximity_auth_client.h b/components/proximity_auth/proximity_auth_client.h
new file mode 100644
index 0000000000000000000000000000000000000000..7efee9f9889a3c6695630f9814d57575b431a342
--- /dev/null
+++ b/components/proximity_auth/proximity_auth_client.h
@@ -0,0 +1,39 @@
+// Copyright 2015 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_CLIENT_H_
+#define COMPONENTS_PROXIMITY_AUTH_CLIENT_H_
+
+#include <string>
+
+#include "base/macros.h"
+
+namespace content {
+class BrowserContext;
+} // namespace content
+
+namespace proximity_auth {
+
+// An interface that needs to be supplied to the Proximity Auth component by its
+// embedder.
+class ProximityAuthClient {
+ public:
+ // Returns the authenticated username for |browser_context|.
+ virtual std::string GetAuthenticatedUsername(
+ content::BrowserContext* browser_context) = 0;
+
+ // Locks the screen for |browser_context|.
+ virtual void Lock(content::BrowserContext* browser_context) = 0;
+
+ protected:
+ ProximityAuthClient() {}
+ virtual ~ProximityAuthClient() {}
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(ProximityAuthClient);
+};
+
+} // namespace proximity_auth
+
+#endif // COMPONENTS_PROXIMITY_AUTH_CLIENT_H_

Powered by Google App Engine
This is Rietveld 408576698