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

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

Issue 11588004: Move ScriptBadge, ActionInfo out of Extension; preparation for BrowserAction (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Latest master for CQ Created 7 years, 11 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
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef CHROME_COMMON_EXTENSIONS_API_EXTENSION_ACTION_ACTION_INFO_H_
6 #define CHROME_COMMON_EXTENSIONS_API_EXTENSION_ACTION_ACTION_INFO_H_
7
8 #include <string>
9
10 #include "chrome/common/extensions/extension_icon_set.h"
11 #include "googleurl/src/gurl.h"
12
13 namespace extensions {
14
15 class Extension;
16
17 struct ActionInfo {
18 ActionInfo();
19 ~ActionInfo();
20
21 // The types of extension actions.
22 enum Type {
23 TYPE_BROWSER,
24 TYPE_PAGE,
25 TYPE_SCRIPT_BADGE,
26 TYPE_SYSTEM_INDICATOR,
27 };
28
29 // Returns the appropriate ActionInfo for the given |extension|.
30 static const ActionInfo* GetScriptBadgeInfo(const Extension* extension);
31
32 // Sets the appropriate ActionInfo as ManifestData for the given |extension|.
33 // This is static since |extension| takes ownership of |info|.
34 static void SetScriptBadgeInfo(Extension* extension, ActionInfo* info);
35
36 // Empty implies the key wasn't present.
37 ExtensionIconSet default_icon;
38 std::string default_title;
39 GURL default_popup_url;
40 // action id -- only used with legacy page actions API.
41 std::string id;
42 };
43
44 } // namespace extensions
45
46 #endif // CHROME_COMMON_EXTENSIONS_API_EXTENSION_ACTION_ACTION_INFO_H_
OLDNEW
« no previous file with comments | « chrome/common/badge_util.cc ('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