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 "base/strings/string16.h" | 10 #include "base/strings/string16.h" |
(...skipping 14 matching lines...) Expand all Loading... |
25 ~ActionInfo(); | 25 ~ActionInfo(); |
26 | 26 |
27 // The types of extension actions. | 27 // The types of extension actions. |
28 enum Type { | 28 enum Type { |
29 TYPE_BROWSER, | 29 TYPE_BROWSER, |
30 TYPE_PAGE, | 30 TYPE_PAGE, |
31 TYPE_SYSTEM_INDICATOR, | 31 TYPE_SYSTEM_INDICATOR, |
32 }; | 32 }; |
33 | 33 |
34 // Loads an ActionInfo from the given DictionaryValue. | 34 // Loads an ActionInfo from the given DictionaryValue. |
35 static scoped_ptr<ActionInfo> Load(const Extension* extension, | 35 static scoped_ptr<ActionInfo> Load(Extension* extension, |
36 const base::DictionaryValue* dict, | 36 const base::DictionaryValue* dict, |
37 base::string16* error); | 37 base::string16* error); |
38 | 38 |
39 // Returns the extension's browser action, if any. | 39 // Returns the extension's browser action, if any. |
40 static const ActionInfo* GetBrowserActionInfo(const Extension* extension); | 40 static const ActionInfo* GetBrowserActionInfo(const Extension* extension); |
41 | 41 |
42 // Returns the extension's page action, if any. | 42 // Returns the extension's page action, if any. |
43 static const ActionInfo* GetPageActionInfo(const Extension* extension); | 43 static const ActionInfo* GetPageActionInfo(const Extension* extension); |
44 | 44 |
45 // Returns the extension's system indicator, if any. | 45 // Returns the extension's system indicator, if any. |
(...skipping 17 matching lines...) Expand all Loading... |
63 ExtensionIconSet default_icon; | 63 ExtensionIconSet default_icon; |
64 std::string default_title; | 64 std::string default_title; |
65 GURL default_popup_url; | 65 GURL default_popup_url; |
66 // action id -- only used with legacy page actions API. | 66 // action id -- only used with legacy page actions API. |
67 std::string id; | 67 std::string id; |
68 }; | 68 }; |
69 | 69 |
70 } // namespace extensions | 70 } // namespace extensions |
71 | 71 |
72 #endif // CHROME_COMMON_EXTENSIONS_API_EXTENSION_ACTION_ACTION_INFO_H_ | 72 #endif // CHROME_COMMON_EXTENSIONS_API_EXTENSION_ACTION_ACTION_INFO_H_ |
OLD | NEW |