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

Side by Side Diff: chrome/browser/chromeos/extensions/power/power_api.h

Issue 12089062: Move API functions registrations out of ExtensionFunctionRegistry. (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: Created 7 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_CHROMEOS_EXTENSIONS_POWER_POWER_API_H_ 5 #ifndef CHROME_BROWSER_CHROMEOS_EXTENSIONS_POWER_POWER_API_H_
6 #define CHROME_BROWSER_CHROMEOS_EXTENSIONS_POWER_POWER_API_H_ 6 #define CHROME_BROWSER_CHROMEOS_EXTENSIONS_POWER_POWER_API_H_
7 7
8 #include "chrome/browser/extensions/extension_function.h" 8 #include "chrome/browser/extensions/extension_function.h"
9 9
10 namespace extensions { 10 namespace extensions {
11 namespace power {
12 11
13 // Implementation of the chrome.experimental.power.requestKeepAwake API. 12 // Implementation of the chrome.experimental.power.requestKeepAwake API.
14 class RequestKeepAwakeFunction : public SyncExtensionFunction { 13 class PowerRequestKeepAwakeFunction : public SyncExtensionFunction {
15 public: 14 public:
16 DECLARE_EXTENSION_FUNCTION("experimental.power.requestKeepAwake", 15 DECLARE_EXTENSION_FUNCTION("experimental.power.requestKeepAwake",
17 EXPERIMENTAL_POWER_REQUESTKEEPAWAKE) 16 EXPERIMENTAL_POWER_REQUESTKEEPAWAKE)
18 17
19 protected: 18 protected:
20 virtual ~RequestKeepAwakeFunction() {} 19 virtual ~PowerRequestKeepAwakeFunction() {}
21 20
22 // ExtensionFunction: 21 // ExtensionFunction:
23 virtual bool RunImpl() OVERRIDE; 22 virtual bool RunImpl() OVERRIDE;
24 }; 23 };
25 24
26 // Implementation of the chrome.experimental.power.releaseKeepAwake API. 25 // Implementation of the chrome.experimental.power.releaseKeepAwake API.
27 class ReleaseKeepAwakeFunction : public SyncExtensionFunction { 26 class PowerReleaseKeepAwakeFunction : public SyncExtensionFunction {
28 public: 27 public:
29 DECLARE_EXTENSION_FUNCTION("experimental.power.releaseKeepAwake", 28 DECLARE_EXTENSION_FUNCTION("experimental.power.releaseKeepAwake",
30 EXPERIMENTAL_POWER_RELEASEKEEPAWAKE) 29 EXPERIMENTAL_POWER_RELEASEKEEPAWAKE)
31 30
32 protected: 31 protected:
33 virtual ~ReleaseKeepAwakeFunction() {} 32 virtual ~PowerReleaseKeepAwakeFunction() {}
34 33
35 // ExtensionFunction: 34 // ExtensionFunction:
36 virtual bool RunImpl() OVERRIDE; 35 virtual bool RunImpl() OVERRIDE;
37 }; 36 };
38 37
39 } // namespace power
40 } // namespace extensions 38 } // namespace extensions
41 39
42 #endif // CHROME_BROWSER_CHROMEOS_EXTENSIONS_POWER_POWER_API_H_ 40 #endif // CHROME_BROWSER_CHROMEOS_EXTENSIONS_POWER_POWER_API_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698