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

Side by Side Diff: chrome/browser/chromeos/extensions/screenlock_private_api.h

Issue 60583003: The chrome.screenlockPrivate API allows select apps to control the ChromeOS ScreenLocker. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 7 years, 1 month 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef CHROME_BROWSER_CHROMEOS_EXTENSIONS_SCREENLOCK_PRIVATE_API_H_
6 #define CHROME_BROWSER_CHROMEOS_EXTENSIONS_SCREENLOCK_PRIVATE_API_H_
7
8 #include "chrome/browser/extensions/chrome_extension_function.h"
9 #include "chromeos/dbus/session_manager_client.h"
10
11 class ScreenlockPrivateGetLockedFunction : public ChromeAsyncExtensionFunction {
12 public:
13 DECLARE_EXTENSION_FUNCTION("screenlockPrivate.getLocked",
14 SCREENLOCKPRIVATE_GETLOCKED)
15 ScreenlockPrivateGetLockedFunction();
16 virtual ~ScreenlockPrivateGetLockedFunction();
17 virtual bool RunImpl() OVERRIDE;
18 private:
19 DISALLOW_COPY_AND_ASSIGN(ScreenlockPrivateGetLockedFunction);
20 };
21
22 class ScreenlockPrivateSetLockedFunction : public ChromeAsyncExtensionFunction {
23 public:
24 DECLARE_EXTENSION_FUNCTION("screenlockPrivate.setLocked",
25 SCREENLOCKPRIVATE_SETLOCKED)
26 ScreenlockPrivateSetLockedFunction();
27 virtual ~ScreenlockPrivateSetLockedFunction();
28 virtual bool RunImpl() OVERRIDE;
29 private:
30 DISALLOW_COPY_AND_ASSIGN(ScreenlockPrivateSetLockedFunction);
31 };
32
33 class ScreenlockPrivateShowMessageFunction
34 : public ChromeAsyncExtensionFunction {
35 public:
36 DECLARE_EXTENSION_FUNCTION("screenlockPrivate.showMessage",
37 SCREENLOCKPRIVATE_SHOWMESSAGE)
38 ScreenlockPrivateShowMessageFunction();
39 virtual ~ScreenlockPrivateShowMessageFunction();
40 virtual bool RunImpl() OVERRIDE;
41 private:
42 DISALLOW_COPY_AND_ASSIGN(ScreenlockPrivateShowMessageFunction );
43 };
44
45 class ScreenlockPrivateEventRouter
46 : public chromeos::SessionManagerClient::Observer {
47 public:
48 explicit ScreenlockPrivateEventRouter(Profile* profile);
49 virtual ~ScreenlockPrivateEventRouter();
50 virtual void ScreenIsLocked() OVERRIDE;
51 virtual void ScreenIsUnlocked() OVERRIDE;
52
53 private:
54 void DispatchEvent(const std::string& event_name, base::Value* arg);
55
56 Profile* profile_;
57 DISALLOW_COPY_AND_ASSIGN(ScreenlockPrivateEventRouter);
58 };
59
60 #endif // CHROME_BROWSER_CHROMEOS_EXTENSIONS_SCREENLOCK_PRIVATE_API_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698