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 #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 Loading... |
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_ |
OLD | NEW |