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 "chrome/common/extensions/extension.h" | 8 #include "chrome/common/extensions/extension.h" |
9 #include "chrome/common/extensions/extension_manifest_constants.h" | 9 #include "chrome/common/extensions/extension_manifest_constants.h" |
10 | 10 |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
48 const ActionInfo* ActionInfo::GetBrowserActionInfo(const Extension* extension) { | 48 const ActionInfo* ActionInfo::GetBrowserActionInfo(const Extension* extension) { |
49 return GetActionInfo(extension, extension_manifest_keys::kBrowserAction); | 49 return GetActionInfo(extension, extension_manifest_keys::kBrowserAction); |
50 } | 50 } |
51 | 51 |
52 // static | 52 // static |
53 const ActionInfo* ActionInfo::GetScriptBadgeInfo(const Extension* extension) { | 53 const ActionInfo* ActionInfo::GetScriptBadgeInfo(const Extension* extension) { |
54 return GetActionInfo(extension, extension_manifest_keys::kScriptBadge); | 54 return GetActionInfo(extension, extension_manifest_keys::kScriptBadge); |
55 } | 55 } |
56 | 56 |
57 // static | 57 // static |
| 58 const ActionInfo* ActionInfo::GetPageLauncherInfo(const Extension* extension) { |
| 59 return GetActionInfo(extension, extension_manifest_keys::kPageLauncher); |
| 60 } |
| 61 |
| 62 // static |
58 void ActionInfo::SetBrowserActionInfo(Extension* extension, ActionInfo* info) { | 63 void ActionInfo::SetBrowserActionInfo(Extension* extension, ActionInfo* info) { |
59 extension->SetManifestData(extension_manifest_keys::kBrowserAction, | 64 extension->SetManifestData(extension_manifest_keys::kBrowserAction, |
60 new ActionInfoData(info)); | 65 new ActionInfoData(info)); |
61 } | 66 } |
62 | 67 |
63 // static | 68 // static |
64 void ActionInfo::SetScriptBadgeInfo(Extension* extension, ActionInfo* info) { | 69 void ActionInfo::SetScriptBadgeInfo(Extension* extension, ActionInfo* info) { |
65 extension->SetManifestData(extension_manifest_keys::kScriptBadge, | 70 extension->SetManifestData(extension_manifest_keys::kScriptBadge, |
66 new ActionInfoData(info)); | 71 new ActionInfoData(info)); |
67 } | 72 } |
68 | 73 |
| 74 // static |
| 75 void ActionInfo::SetPageLauncherInfo(Extension* extension, ActionInfo* info) { |
| 76 extension->SetManifestData(extension_manifest_keys::kPageLauncher, |
| 77 new ActionInfoData(info)); |
| 78 } |
| 79 |
69 } // namespace extensions | 80 } // namespace extensions |
OLD | NEW |