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 15 matching lines...) Expand all Loading... |
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 script badge. | 33 // Returns the extension's script badge. |
34 static const ActionInfo* GetScriptBadgeInfo(const Extension* etxension); | 34 static const ActionInfo* GetScriptBadgeInfo(const Extension* etxension); |
35 | 35 |
| 36 // Returns the extension's page launcher. |
| 37 static const ActionInfo* GetPageLauncherInfo(const Extension* extension); |
| 38 |
36 // Sets the extension's browser action. |extension| takes ownership of |info|. | 39 // Sets the extension's browser action. |extension| takes ownership of |info|. |
37 static void SetBrowserActionInfo(Extension* extension, ActionInfo* info); | 40 static void SetBrowserActionInfo(Extension* extension, ActionInfo* info); |
38 | 41 |
39 // Sets the extension's script badge. |extension| takes ownership of |info|. | 42 // Sets the extension's script badge. |extension| takes ownership of |info|. |
40 static void SetScriptBadgeInfo(Extension* etxension, ActionInfo* info); | 43 static void SetScriptBadgeInfo(Extension* etxension, ActionInfo* info); |
41 | 44 |
| 45 // Sets the extension's page launcher. |extension| takes ownership of |info|. |
| 46 static void SetPageLauncherInfo(Extension* extension, ActionInfo* info); |
| 47 |
42 // Empty implies the key wasn't present. | 48 // Empty implies the key wasn't present. |
43 ExtensionIconSet default_icon; | 49 ExtensionIconSet default_icon; |
44 std::string default_title; | 50 std::string default_title; |
45 GURL default_popup_url; | 51 GURL default_popup_url; |
46 // action id -- only used with legacy page actions API. | 52 // action id -- only used with legacy page actions API. |
47 std::string id; | 53 std::string id; |
48 }; | 54 }; |
49 | 55 |
50 } // namespace extensions | 56 } // namespace extensions |
51 | 57 |
52 #endif // CHROME_COMMON_EXTENSIONS_API_EXTENSION_ACTION_ACTION_INFO_H_ | 58 #endif // CHROME_COMMON_EXTENSIONS_API_EXTENSION_ACTION_ACTION_INFO_H_ |
OLD | NEW |