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

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

Issue 12042096: Move page action manifest parsing out of Extension; the first multi-key manifest handler. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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 | Annotate | Revision Log
« no previous file with comments | « chrome/chrome_common.gypi ('k') | chrome/common/extensions/api/extension_action/action_info.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #ifndef CHROME_COMMON_EXTENSIONS_API_EXTENSION_ACTION_ACTION_INFO_H_ 5 #ifndef CHROME_COMMON_EXTENSIONS_API_EXTENSION_ACTION_ACTION_INFO_H_
6 #define CHROME_COMMON_EXTENSIONS_API_EXTENSION_ACTION_ACTION_INFO_H_ 6 #define CHROME_COMMON_EXTENSIONS_API_EXTENSION_ACTION_ACTION_INFO_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "chrome/common/extensions/extension.h" 10 #include "chrome/common/extensions/extension.h"
(...skipping 12 matching lines...) Expand all
23 enum Type { 23 enum Type {
24 TYPE_BROWSER, 24 TYPE_BROWSER,
25 TYPE_PAGE, 25 TYPE_PAGE,
26 TYPE_SCRIPT_BADGE, 26 TYPE_SCRIPT_BADGE,
27 TYPE_SYSTEM_INDICATOR, 27 TYPE_SYSTEM_INDICATOR,
28 }; 28 };
29 29
30 // Returns the extension's browser action, if any. 30 // Returns the extension's browser action, if any.
31 static const ActionInfo* GetBrowserActionInfo(const Extension* extension); 31 static const ActionInfo* GetBrowserActionInfo(const Extension* extension);
32 32
33 // Returns the extension's page action, if any.
34 static const ActionInfo* GetPageActionInfo(const Extension* extension);
35
33 // Returns the extension's script badge. 36 // Returns the extension's script badge.
34 static const ActionInfo* GetScriptBadgeInfo(const Extension* etxension); 37 static const ActionInfo* GetScriptBadgeInfo(const Extension* etxension);
35 38
36 // Returns the extension's page launcher. 39 // Returns the extension's page launcher.
37 static const ActionInfo* GetPageLauncherInfo(const Extension* extension); 40 static const ActionInfo* GetPageLauncherInfo(const Extension* extension);
38 41
39 // Sets the extension's browser action. |extension| takes ownership of |info|. 42 // Sets the extension's browser action. |extension| takes ownership of |info|.
40 static void SetBrowserActionInfo(Extension* extension, ActionInfo* info); 43 static void SetBrowserActionInfo(Extension* extension, ActionInfo* info);
41 44
45 // Sets the extension's page action. |extension| takes ownership of |info|.
46 static void SetPageActionInfo(Extension* extension, ActionInfo* info);
47
42 // Sets the extension's script badge. |extension| takes ownership of |info|. 48 // Sets the extension's script badge. |extension| takes ownership of |info|.
43 static void SetScriptBadgeInfo(Extension* etxension, ActionInfo* info); 49 static void SetScriptBadgeInfo(Extension* extension, ActionInfo* info);
44 50
45 // Sets the extension's page launcher. |extension| takes ownership of |info|. 51 // Sets the extension's page launcher. |extension| takes ownership of |info|.
46 static void SetPageLauncherInfo(Extension* extension, ActionInfo* info); 52 static void SetPageLauncherInfo(Extension* extension, ActionInfo* info);
47 53
54 // Returns true if the extension needs a verbose install message because
55 // of its page action.
56 static bool IsVerboseInstallMessage(const Extension* extension);
57
48 // Empty implies the key wasn't present. 58 // Empty implies the key wasn't present.
49 ExtensionIconSet default_icon; 59 ExtensionIconSet default_icon;
50 std::string default_title; 60 std::string default_title;
51 GURL default_popup_url; 61 GURL default_popup_url;
52 // action id -- only used with legacy page actions API. 62 // action id -- only used with legacy page actions API.
53 std::string id; 63 std::string id;
54 }; 64 };
55 65
56 } // namespace extensions 66 } // namespace extensions
57 67
58 #endif // CHROME_COMMON_EXTENSIONS_API_EXTENSION_ACTION_ACTION_INFO_H_ 68 #endif // CHROME_COMMON_EXTENSIONS_API_EXTENSION_ACTION_ACTION_INFO_H_
OLDNEW
« no previous file with comments | « chrome/chrome_common.gypi ('k') | chrome/common/extensions/api/extension_action/action_info.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698