OLD | NEW |
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 #include "chrome/common/extensions/api/extension_action/action_info.h" | 5 #include "chrome/common/extensions/api/extension_action/action_info.h" |
6 | 6 |
7 #include "base/memory/scoped_ptr.h" | 7 #include "base/memory/scoped_ptr.h" |
8 #include "base/strings/utf_string_conversions.h" | 8 #include "base/strings/utf_string_conversions.h" |
9 #include "chrome/common/extensions/api/commands/commands_handler.h" | 9 #include "chrome/common/extensions/api/commands/commands_handler.h" |
10 #include "chrome/common/extensions/extension.h" | 10 #include "chrome/common/extensions/extension.h" |
11 #include "chrome/common/extensions/extension_manifest_constants.h" | |
12 #include "chrome/common/extensions/manifest_handler_helpers.h" | 11 #include "chrome/common/extensions/manifest_handler_helpers.h" |
13 #include "extensions/common/error_utils.h" | 12 #include "extensions/common/error_utils.h" |
14 | 13 #include "extensions/common/manifest_constants.h" |
15 namespace errors = extension_manifest_errors; | |
16 namespace keys = extensions::manifest_keys; | |
17 | 14 |
18 namespace extensions { | 15 namespace extensions { |
19 | 16 |
| 17 namespace errors = manifest_errors; |
| 18 namespace keys = manifest_keys; |
| 19 |
20 namespace { | 20 namespace { |
21 | 21 |
22 // The manifest data container for the ActionInfos for BrowserActions and | 22 // The manifest data container for the ActionInfos for BrowserActions and |
23 // ScriptBadges. | 23 // ScriptBadges. |
24 struct ActionInfoData : public Extension::ManifestData { | 24 struct ActionInfoData : public Extension::ManifestData { |
25 explicit ActionInfoData(ActionInfo* action_info); | 25 explicit ActionInfoData(ActionInfo* action_info); |
26 virtual ~ActionInfoData(); | 26 virtual ~ActionInfoData(); |
27 | 27 |
28 // The action associated with the BrowserAction or ScriptBadge. | 28 // The action associated with the BrowserAction or ScriptBadge. |
29 // This is never NULL for ScriptBadge. | 29 // This is never NULL for ScriptBadge. |
(...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
224 | 224 |
225 // static | 225 // static |
226 bool ActionInfo::IsVerboseInstallMessage(const Extension* extension) { | 226 bool ActionInfo::IsVerboseInstallMessage(const Extension* extension) { |
227 const ActionInfo* page_action_info = GetPageActionInfo(extension); | 227 const ActionInfo* page_action_info = GetPageActionInfo(extension); |
228 return page_action_info && | 228 return page_action_info && |
229 (CommandsInfo::GetPageActionCommand(extension) || | 229 (CommandsInfo::GetPageActionCommand(extension) || |
230 !page_action_info->default_icon.empty()); | 230 !page_action_info->default_icon.empty()); |
231 } | 231 } |
232 | 232 |
233 } // namespace extensions | 233 } // namespace extensions |
OLD | NEW |