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(); |