OLD | NEW |
---|---|
(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 #include "chrome/browser/extensions/api/power/power_api.h" | |
6 | |
7 #include "chrome/browser/extensions/api/power/power_api_manager.h" | |
8 #include "chrome/common/extensions/api/power.h" | |
9 | |
10 namespace extensions { | |
11 | |
12 bool PowerRequestKeepAwakeFunction::RunImpl() { | |
13 scoped_ptr<api::power::RequestKeepAwake::Params> params( | |
14 api::power::RequestKeepAwake::Params::Create(*args_)); | |
15 EXTENSION_FUNCTION_VALIDATE(params); | |
16 PowerApiManager::GetInstance()->AddRequest(extension_id(), | |
17 params->level == api::power::LEVEL_NONE ? api::power::LEVEL_DISPLAY : | |
not at google - send to devlin
2013/03/20 00:25:50
seems like PowerApiManager needs to deal with the
Daniel Erat
2013/03/20 00:47:46
Ah, okay; I figured that NONE was there for option
| |
18 params->level); | |
19 return true; | |
20 } | |
21 | |
22 bool PowerReleaseKeepAwakeFunction::RunImpl() { | |
23 PowerApiManager::GetInstance()->RemoveRequest(extension_id()); | |
24 return true; | |
25 } | |
26 | |
27 } // namespace extensions | |
OLD | NEW |