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

Unified Diff: chrome/browser/chromeos/extensions/screenlock_private_api.h

Issue 168623003: Add chrome.screenlockPrivate API functions to handle alternate auth types. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase 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 | « no previous file | chrome/browser/chromeos/extensions/screenlock_private_api.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/extensions/screenlock_private_api.h
diff --git a/chrome/browser/chromeos/extensions/screenlock_private_api.h b/chrome/browser/chromeos/extensions/screenlock_private_api.h
index 330812a6149295bc392675c61cbb97828aa4420a..3aa43ef77b2d240597d59e4dbc13b5ea11645b9b 100644
--- a/chrome/browser/chromeos/extensions/screenlock_private_api.h
+++ b/chrome/browser/chromeos/extensions/screenlock_private_api.h
@@ -5,6 +5,7 @@
#ifndef CHROME_BROWSER_CHROMEOS_EXTENSIONS_SCREENLOCK_PRIVATE_API_H_
#define CHROME_BROWSER_CHROMEOS_EXTENSIONS_SCREENLOCK_PRIVATE_API_H_
+#include "chrome/browser/chromeos/login/login_display.h"
#include "chrome/browser/extensions/api/profile_keyed_api_factory.h"
#include "chrome/browser/extensions/chrome_extension_function.h"
#include "chromeos/dbus/session_manager_client.h"
@@ -55,7 +56,60 @@ class ScreenlockPrivateShowButtonFunction
private:
virtual ~ScreenlockPrivateShowButtonFunction();
void OnImageLoaded(const gfx::Image& image);
- DISALLOW_COPY_AND_ASSIGN(ScreenlockPrivateShowButtonFunction );
+ DISALLOW_COPY_AND_ASSIGN(ScreenlockPrivateShowButtonFunction);
+};
+
+class ScreenlockPrivateHideButtonFunction
+ : public ChromeAsyncExtensionFunction {
+ public:
+ DECLARE_EXTENSION_FUNCTION("screenlockPrivate.hideButton",
+ SCREENLOCKPRIVATE_HIDEBUTTON)
+ ScreenlockPrivateHideButtonFunction();
+ virtual bool RunImpl() OVERRIDE;
+
+ private:
+ virtual ~ScreenlockPrivateHideButtonFunction();
+ void OnImageLoaded(const gfx::Image& image);
+ DISALLOW_COPY_AND_ASSIGN(ScreenlockPrivateHideButtonFunction);
+};
+
+class ScreenlockPrivateSetAuthTypeFunction
+ : public ChromeAsyncExtensionFunction {
+ public:
+ DECLARE_EXTENSION_FUNCTION("screenlockPrivate.setAuthType",
+ SCREENLOCKPRIVATE_SETAUTHTYPE)
+ ScreenlockPrivateSetAuthTypeFunction();
+ virtual bool RunImpl() OVERRIDE;
+
+ private:
+ virtual ~ScreenlockPrivateSetAuthTypeFunction();
+ DISALLOW_COPY_AND_ASSIGN(ScreenlockPrivateSetAuthTypeFunction);
+};
+
+class ScreenlockPrivateGetAuthTypeFunction
+ : public ChromeAsyncExtensionFunction {
+ public:
+ DECLARE_EXTENSION_FUNCTION("screenlockPrivate.getAuthType",
+ SCREENLOCKPRIVATE_GETAUTHTYPE)
+ ScreenlockPrivateGetAuthTypeFunction();
+ virtual bool RunImpl() OVERRIDE;
+
+ private:
+ virtual ~ScreenlockPrivateGetAuthTypeFunction();
+ DISALLOW_COPY_AND_ASSIGN(ScreenlockPrivateGetAuthTypeFunction);
+};
+
+class ScreenlockPrivateAcceptAuthAttemptFunction
+ : public ChromeAsyncExtensionFunction {
+ public:
+ DECLARE_EXTENSION_FUNCTION("screenlockPrivate.acceptAuthAttempt",
+ SCREENLOCKPRIVATE_ACCEPTAUTHATTEMPT)
+ ScreenlockPrivateAcceptAuthAttemptFunction();
+ virtual bool RunImpl() OVERRIDE;
+
+ private:
+ virtual ~ScreenlockPrivateAcceptAuthAttemptFunction();
+ DISALLOW_COPY_AND_ASSIGN(ScreenlockPrivateAcceptAuthAttemptFunction);
};
class ScreenlockPrivateEventRouter
@@ -67,6 +121,9 @@ class ScreenlockPrivateEventRouter
void OnButtonClicked();
+ void OnAuthAttempted(chromeos::LoginDisplay::AuthType auth_type,
+ const std::string& value);
+
// ProfileKeyedAPI
static extensions::ProfileKeyedAPIFactory<ScreenlockPrivateEventRouter>*
GetFactoryInstance();
« no previous file with comments | « no previous file | chrome/browser/chromeos/extensions/screenlock_private_api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698