Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(273)

Side by Side Diff: chrome/common/extensions/api/extension_action/action_info.cc

Issue 12095023: Allow platform apps to add themselves to the Action Box. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Use raw pointer + IconImage signature changed Created 7 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
OLDNEW
« no previous file with comments | « chrome/common/extensions/api/extension_action/action_info.h ('k') | chrome/common/extensions/api/page_launcher.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698