Chromium Code Reviews| Index: chrome/browser/extensions/api/system_indicator/system_indicator_api.cc |
| diff --git a/chrome/browser/extensions/api/system_indicator/system_indicator_api.cc b/chrome/browser/extensions/api/system_indicator/system_indicator_api.cc |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..1f6607712a7cfbf7c377b1139173a9b7c1243b6a |
| --- /dev/null |
| +++ b/chrome/browser/extensions/api/system_indicator/system_indicator_api.cc |
| @@ -0,0 +1,53 @@ |
| +// Copyright (c) 2012 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. |
| + |
| +#include "chrome/browser/extensions/api/system_indicator/system_indicator_api.h" |
| + |
| +#include "chrome/browser/extensions/extension_system.h" |
| +#include "chrome/common/extensions/api/experimental_system_indicator.h" |
| + |
| +namespace extensions { |
| + |
| +SystemIndicatorSetIconURLFunction::SystemIndicatorSetIconURLFunction() {} |
| + |
| +bool SystemIndicatorSetIconURLFunction::RunImpl() { |
| + scoped_ptr<api::experimental_system_indicator::SetIconURL::Params> params( |
| + api::experimental_system_indicator::SetIconURL::Params::Create(*args_)); |
| + EXTENSION_FUNCTION_VALIDATE(params.get()); |
| + |
| + return true; |
| +} |
| + |
| +SystemIndicatorSetIconDataFunction::SystemIndicatorSetIconDataFunction() {} |
| + |
| +bool SystemIndicatorSetIconDataFunction::RunImpl() { |
| + scoped_ptr<api::experimental_system_indicator::SetIconData::Params> params( |
| + api::experimental_system_indicator::SetIconData::Params::Create(*args_)); |
| + /* Validation is tricky since instanceOf can't be used for ImageData */ |
|
jianli
2012/11/14 19:27:41
nit: We usually start the comment with "//".
dewittj
2012/11/16 00:56:28
Removed comment since I found a way to get params
|
| + return true; |
| +} |
| + |
| +SystemIndicatorSetMenuFunction::SystemIndicatorSetMenuFunction() {} |
| + |
| +bool SystemIndicatorSetMenuFunction::RunImpl() { |
| + scoped_ptr<api::experimental_system_indicator::SetMenu::Params> params( |
| + api::experimental_system_indicator::SetMenu::Params::Create(*args_)); |
| + EXTENSION_FUNCTION_VALIDATE(params.get()); |
| + return true; |
| +} |
| + |
| + |
|
not at google - send to devlin
2012/11/14 19:53:20
nit: remove blank line
dewittj
2012/11/16 00:56:28
Done
|
| +SystemIndicatorShowFunction::SystemIndicatorShowFunction() {} |
| + |
| +bool SystemIndicatorShowFunction::RunImpl() { |
| + return true; |
| +} |
| + |
| +SystemIndicatorHideFunction::SystemIndicatorHideFunction() {} |
| + |
| +bool SystemIndicatorHideFunction::RunImpl() { |
| + return true; |
| +} |
| + |
| +} // namespace extensions |