| OLD | NEW |
| (Empty) |
| 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 | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef CHROME_BROWSER_CHROMEOS_EXTENSIONS_POWER_POWER_API_H_ | |
| 6 #define CHROME_BROWSER_CHROMEOS_EXTENSIONS_POWER_POWER_API_H_ | |
| 7 | |
| 8 #include "chrome/browser/extensions/extension_function.h" | |
| 9 | |
| 10 namespace extensions { | |
| 11 | |
| 12 // Implementation of the chrome.experimental.power.requestKeepAwake API. | |
| 13 class PowerRequestKeepAwakeFunction : public SyncExtensionFunction { | |
| 14 public: | |
| 15 DECLARE_EXTENSION_FUNCTION("experimental.power.requestKeepAwake", | |
| 16 EXPERIMENTAL_POWER_REQUESTKEEPAWAKE) | |
| 17 | |
| 18 protected: | |
| 19 virtual ~PowerRequestKeepAwakeFunction() {} | |
| 20 | |
| 21 // ExtensionFunction: | |
| 22 virtual bool RunImpl() OVERRIDE; | |
| 23 }; | |
| 24 | |
| 25 // Implementation of the chrome.experimental.power.releaseKeepAwake API. | |
| 26 class PowerReleaseKeepAwakeFunction : public SyncExtensionFunction { | |
| 27 public: | |
| 28 DECLARE_EXTENSION_FUNCTION("experimental.power.releaseKeepAwake", | |
| 29 EXPERIMENTAL_POWER_RELEASEKEEPAWAKE) | |
| 30 | |
| 31 protected: | |
| 32 virtual ~PowerReleaseKeepAwakeFunction() {} | |
| 33 | |
| 34 // ExtensionFunction: | |
| 35 virtual bool RunImpl() OVERRIDE; | |
| 36 }; | |
| 37 | |
| 38 } // namespace extensions | |
| 39 | |
| 40 #endif // CHROME_BROWSER_CHROMEOS_EXTENSIONS_POWER_POWER_API_H_ | |
| OLD | NEW |