| 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
 | 
| new file mode 100644
 | 
| index 0000000000000000000000000000000000000000..f172262599c9f17b2f2101ef77faefa9f9d3318c
 | 
| --- /dev/null
 | 
| +++ b/chrome/browser/chromeos/extensions/screenlock_private_api.h
 | 
| @@ -0,0 +1,80 @@
 | 
| +// Copyright (c) 2013 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 CHROME_BROWSER_CHROMEOS_EXTENSIONS_SCREENLOCK_PRIVATE_API_H_
 | 
| +#define CHROME_BROWSER_CHROMEOS_EXTENSIONS_SCREENLOCK_PRIVATE_API_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"
 | 
| +
 | 
| +namespace extensions {
 | 
| +
 | 
| +class ScreenlockPrivateGetLockedFunction : public ChromeAsyncExtensionFunction {
 | 
| + public:
 | 
| +  DECLARE_EXTENSION_FUNCTION("screenlockPrivate.getLocked",
 | 
| +                             SCREENLOCKPRIVATE_GETLOCKED)
 | 
| +  ScreenlockPrivateGetLockedFunction();
 | 
| +  virtual ~ScreenlockPrivateGetLockedFunction();
 | 
| +  virtual bool RunImpl() OVERRIDE;
 | 
| + private:
 | 
| +  DISALLOW_COPY_AND_ASSIGN(ScreenlockPrivateGetLockedFunction);
 | 
| +};
 | 
| +
 | 
| +class ScreenlockPrivateSetLockedFunction : public ChromeAsyncExtensionFunction {
 | 
| + public:
 | 
| +  DECLARE_EXTENSION_FUNCTION("screenlockPrivate.setLocked",
 | 
| +                             SCREENLOCKPRIVATE_SETLOCKED)
 | 
| +  ScreenlockPrivateSetLockedFunction();
 | 
| +  virtual ~ScreenlockPrivateSetLockedFunction();
 | 
| +  virtual bool RunImpl() OVERRIDE;
 | 
| + private:
 | 
| +  DISALLOW_COPY_AND_ASSIGN(ScreenlockPrivateSetLockedFunction);
 | 
| +};
 | 
| +
 | 
| +class ScreenlockPrivateShowMessageFunction
 | 
| +    : public ChromeAsyncExtensionFunction {
 | 
| + public:
 | 
| +  DECLARE_EXTENSION_FUNCTION("screenlockPrivate.showMessage",
 | 
| +                             SCREENLOCKPRIVATE_SHOWMESSAGE)
 | 
| +  ScreenlockPrivateShowMessageFunction();
 | 
| +  virtual ~ScreenlockPrivateShowMessageFunction();
 | 
| +  virtual bool RunImpl() OVERRIDE;
 | 
| + private:
 | 
| +  DISALLOW_COPY_AND_ASSIGN(ScreenlockPrivateShowMessageFunction );
 | 
| +};
 | 
| +
 | 
| +class ScreenlockPrivateEventRouter
 | 
| +    : public extensions::ProfileKeyedAPI,
 | 
| +      public chromeos::SessionManagerClient::Observer {
 | 
| + public:
 | 
| +  explicit ScreenlockPrivateEventRouter(Profile* profile);
 | 
| +  virtual ~ScreenlockPrivateEventRouter();
 | 
| +  virtual void ScreenIsLocked() OVERRIDE;
 | 
| +  virtual void ScreenIsUnlocked() OVERRIDE;
 | 
| +
 | 
| +  // ProfileKeyedAPI
 | 
| +  static extensions::ProfileKeyedAPIFactory<ScreenlockPrivateEventRouter>*
 | 
| +    GetFactoryInstance();
 | 
| +  virtual void Shutdown() OVERRIDE;
 | 
| +
 | 
| + private:
 | 
| +  friend class extensions::ProfileKeyedAPIFactory<ScreenlockPrivateEventRouter>;
 | 
| +
 | 
| +  // ProfileKeyedAPI
 | 
| +  static const char* service_name() {
 | 
| +    return "ScreenlockPrivateEventRouter";
 | 
| +  }
 | 
| +  static const bool kServiceIsNULLWhileTesting = true;
 | 
| +  static const bool kServiceRedirectedInIncognito = true;
 | 
| +
 | 
| +  void DispatchEvent(const std::string& event_name, base::Value* arg);
 | 
| +
 | 
| +  Profile* profile_;
 | 
| +  DISALLOW_COPY_AND_ASSIGN(ScreenlockPrivateEventRouter);
 | 
| +};
 | 
| +
 | 
| +}  // namespace extensions
 | 
| +
 | 
| +#endif  // CHROME_BROWSER_CHROMEOS_EXTENSIONS_SCREENLOCK_PRIVATE_API_H_
 | 
| 
 |