| 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_EXTENSION_H_ | 5 #ifndef CHROME_COMMON_EXTENSIONS_EXTENSION_H_ |
| 6 #define CHROME_COMMON_EXTENSIONS_EXTENSION_H_ | 6 #define CHROME_COMMON_EXTENSIONS_EXTENSION_H_ |
| 7 | 7 |
| 8 #include <algorithm> | 8 #include <algorithm> |
| 9 #include <iosfwd> | 9 #include <iosfwd> |
| 10 #include <map> | 10 #include <map> |
| (...skipping 29 matching lines...) Expand all Loading... |
| 40 | 40 |
| 41 namespace base { | 41 namespace base { |
| 42 class DictionaryValue; | 42 class DictionaryValue; |
| 43 class ListValue; | 43 class ListValue; |
| 44 } | 44 } |
| 45 | 45 |
| 46 namespace gfx { | 46 namespace gfx { |
| 47 class ImageSkia; | 47 class ImageSkia; |
| 48 } | 48 } |
| 49 | 49 |
| 50 namespace webkit_glue { | |
| 51 struct WebIntentServiceData; | |
| 52 } | |
| 53 | |
| 54 FORWARD_DECLARE_TEST(TabStripModelTest, Apps); | 50 FORWARD_DECLARE_TEST(TabStripModelTest, Apps); |
| 55 | 51 |
| 56 namespace extensions { | 52 namespace extensions { |
| 57 | 53 |
| 58 class Manifest; | 54 class Manifest; |
| 59 class PermissionSet; | 55 class PermissionSet; |
| 60 | 56 |
| 61 typedef std::set<std::string> OAuth2Scopes; | 57 typedef std::set<std::string> OAuth2Scopes; |
| 62 | 58 |
| 63 // Represents a Chrome extension. | 59 // Represents a Chrome extension. |
| (...skipping 661 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 725 const extensions::Manifest* manifest() const { | 721 const extensions::Manifest* manifest() const { |
| 726 return manifest_.get(); | 722 return manifest_.get(); |
| 727 } | 723 } |
| 728 const std::string default_locale() const { return default_locale_; } | 724 const std::string default_locale() const { return default_locale_; } |
| 729 const URLOverrideMap& GetChromeURLOverrides() const { | 725 const URLOverrideMap& GetChromeURLOverrides() const { |
| 730 return chrome_url_overrides_; | 726 return chrome_url_overrides_; |
| 731 } | 727 } |
| 732 bool incognito_split_mode() const { return incognito_split_mode_; } | 728 bool incognito_split_mode() const { return incognito_split_mode_; } |
| 733 bool offline_enabled() const { return offline_enabled_; } | 729 bool offline_enabled() const { return offline_enabled_; } |
| 734 const OAuth2Info& oauth2_info() const { return oauth2_info_; } | 730 const OAuth2Info& oauth2_info() const { return oauth2_info_; } |
| 735 const std::vector<webkit_glue::WebIntentServiceData>& | |
| 736 intents_services() const { | |
| 737 return intents_services_; | |
| 738 } | |
| 739 | |
| 740 bool wants_file_access() const { return wants_file_access_; } | 731 bool wants_file_access() const { return wants_file_access_; } |
| 741 int creation_flags() const { return creation_flags_; } | 732 int creation_flags() const { return creation_flags_; } |
| 742 bool from_webstore() const { return (creation_flags_ & FROM_WEBSTORE) != 0; } | 733 bool from_webstore() const { return (creation_flags_ & FROM_WEBSTORE) != 0; } |
| 743 bool from_bookmark() const { return (creation_flags_ & FROM_BOOKMARK) != 0; } | 734 bool from_bookmark() const { return (creation_flags_ & FROM_BOOKMARK) != 0; } |
| 744 bool was_installed_by_default() const { | 735 bool was_installed_by_default() const { |
| 745 return (creation_flags_ & WAS_INSTALLED_BY_DEFAULT) != 0; | 736 return (creation_flags_ & WAS_INSTALLED_BY_DEFAULT) != 0; |
| 746 } | 737 } |
| 747 | 738 |
| 748 // App-related. | 739 // App-related. |
| 749 bool is_app() const { | 740 bool is_app() const { |
| (...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 890 string16* error); | 881 string16* error); |
| 891 bool LoadBackgroundPage(const std::string& key, | 882 bool LoadBackgroundPage(const std::string& key, |
| 892 const APIPermissionSet& api_permissions, | 883 const APIPermissionSet& api_permissions, |
| 893 string16* error); | 884 string16* error); |
| 894 bool LoadBackgroundPersistent( | 885 bool LoadBackgroundPersistent( |
| 895 const APIPermissionSet& api_permissions, | 886 const APIPermissionSet& api_permissions, |
| 896 string16* error); | 887 string16* error); |
| 897 bool LoadBackgroundAllowJSAccess( | 888 bool LoadBackgroundAllowJSAccess( |
| 898 const APIPermissionSet& api_permissions, | 889 const APIPermissionSet& api_permissions, |
| 899 string16* error); | 890 string16* error); |
| 900 // Parses a single action in the manifest. | |
| 901 bool LoadWebIntentAction(const std::string& action_name, | |
| 902 const base::DictionaryValue& intent_service, | |
| 903 string16* error); | |
| 904 bool LoadWebIntentServices(string16* error); | |
| 905 bool LoadFileHandler(const std::string& handler_id, | 891 bool LoadFileHandler(const std::string& handler_id, |
| 906 const base::DictionaryValue& handler_info, | 892 const base::DictionaryValue& handler_info, |
| 907 string16* error); | 893 string16* error); |
| 908 bool LoadFileHandlers(string16* error); | 894 bool LoadFileHandlers(string16* error); |
| 909 bool LoadExtensionFeatures(APIPermissionSet* api_permissions, | 895 bool LoadExtensionFeatures(APIPermissionSet* api_permissions, |
| 910 string16* error); | 896 string16* error); |
| 911 bool LoadManifestHandlerFeatures(string16* error); | 897 bool LoadManifestHandlerFeatures(string16* error); |
| 912 bool LoadDevToolsPage(string16* error); | 898 bool LoadDevToolsPage(string16* error); |
| 913 bool LoadContentScripts(string16* error); | 899 bool LoadContentScripts(string16* error); |
| 914 bool LoadPageAction(string16* error); | 900 bool LoadPageAction(string16* error); |
| (...skipping 278 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1193 | 1179 |
| 1194 // Should this app be shown in the app launcher. | 1180 // Should this app be shown in the app launcher. |
| 1195 bool display_in_launcher_; | 1181 bool display_in_launcher_; |
| 1196 | 1182 |
| 1197 // Should this app be shown in the browser New Tab Page. | 1183 // Should this app be shown in the browser New Tab Page. |
| 1198 bool display_in_new_tab_page_; | 1184 bool display_in_new_tab_page_; |
| 1199 | 1185 |
| 1200 // The OAuth2 client id and scopes, if specified by the extension. | 1186 // The OAuth2 client id and scopes, if specified by the extension. |
| 1201 OAuth2Info oauth2_info_; | 1187 OAuth2Info oauth2_info_; |
| 1202 | 1188 |
| 1203 // List of intent services that this extension provides, if any. | |
| 1204 std::vector<webkit_glue::WebIntentServiceData> intents_services_; | |
| 1205 | |
| 1206 // List of file handlers associated with this extension, if any. | 1189 // List of file handlers associated with this extension, if any. |
| 1207 std::vector<FileHandlerInfo> file_handlers_; | 1190 std::vector<FileHandlerInfo> file_handlers_; |
| 1208 | 1191 |
| 1209 // Whether the extension has host permissions or user script patterns that | 1192 // Whether the extension has host permissions or user script patterns that |
| 1210 // imply access to file:/// scheme URLs (the user may not have actually | 1193 // imply access to file:/// scheme URLs (the user may not have actually |
| 1211 // granted it that access). | 1194 // granted it that access). |
| 1212 bool wants_file_access_; | 1195 bool wants_file_access_; |
| 1213 | 1196 |
| 1214 // The flags that were passed to InitFromValue. | 1197 // The flags that were passed to InitFromValue. |
| 1215 int creation_flags_; | 1198 int creation_flags_; |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1282 | 1265 |
| 1283 UpdatedExtensionPermissionsInfo( | 1266 UpdatedExtensionPermissionsInfo( |
| 1284 const Extension* extension, | 1267 const Extension* extension, |
| 1285 const PermissionSet* permissions, | 1268 const PermissionSet* permissions, |
| 1286 Reason reason); | 1269 Reason reason); |
| 1287 }; | 1270 }; |
| 1288 | 1271 |
| 1289 } // namespace extensions | 1272 } // namespace extensions |
| 1290 | 1273 |
| 1291 #endif // CHROME_COMMON_EXTENSIONS_EXTENSION_H_ | 1274 #endif // CHROME_COMMON_EXTENSIONS_EXTENSION_H_ |
| OLD | NEW |