| 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 699 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 763 return manifest_.get(); | 759 return manifest_.get(); |
| 764 } | 760 } |
| 765 const std::string default_locale() const { return default_locale_; } | 761 const std::string default_locale() const { return default_locale_; } |
| 766 const URLOverrideMap& GetChromeURLOverrides() const { | 762 const URLOverrideMap& GetChromeURLOverrides() const { |
| 767 return chrome_url_overrides_; | 763 return chrome_url_overrides_; |
| 768 } | 764 } |
| 769 bool incognito_split_mode() const { return incognito_split_mode_; } | 765 bool incognito_split_mode() const { return incognito_split_mode_; } |
| 770 bool offline_enabled() const { return offline_enabled_; } | 766 bool offline_enabled() const { return offline_enabled_; } |
| 771 const std::vector<TtsVoice>& tts_voices() const { return tts_voices_; } | 767 const std::vector<TtsVoice>& tts_voices() const { return tts_voices_; } |
| 772 const OAuth2Info& oauth2_info() const { return oauth2_info_; } | 768 const OAuth2Info& oauth2_info() const { return oauth2_info_; } |
| 773 const std::vector<webkit_glue::WebIntentServiceData>& | |
| 774 intents_services() const { | |
| 775 return intents_services_; | |
| 776 } | |
| 777 | |
| 778 bool wants_file_access() const { return wants_file_access_; } | 769 bool wants_file_access() const { return wants_file_access_; } |
| 779 int creation_flags() const { return creation_flags_; } | 770 int creation_flags() const { return creation_flags_; } |
| 780 bool from_webstore() const { return (creation_flags_ & FROM_WEBSTORE) != 0; } | 771 bool from_webstore() const { return (creation_flags_ & FROM_WEBSTORE) != 0; } |
| 781 bool from_bookmark() const { return (creation_flags_ & FROM_BOOKMARK) != 0; } | 772 bool from_bookmark() const { return (creation_flags_ & FROM_BOOKMARK) != 0; } |
| 782 bool was_installed_by_default() const { | 773 bool was_installed_by_default() const { |
| 783 return (creation_flags_ & WAS_INSTALLED_BY_DEFAULT) != 0; | 774 return (creation_flags_ & WAS_INSTALLED_BY_DEFAULT) != 0; |
| 784 } | 775 } |
| 785 | 776 |
| 786 // App-related. | 777 // App-related. |
| 787 bool is_app() const { | 778 bool is_app() const { |
| (...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 925 string16* error); | 916 string16* error); |
| 926 bool LoadBackgroundPage(const std::string& key, | 917 bool LoadBackgroundPage(const std::string& key, |
| 927 const APIPermissionSet& api_permissions, | 918 const APIPermissionSet& api_permissions, |
| 928 string16* error); | 919 string16* error); |
| 929 bool LoadBackgroundPersistent( | 920 bool LoadBackgroundPersistent( |
| 930 const APIPermissionSet& api_permissions, | 921 const APIPermissionSet& api_permissions, |
| 931 string16* error); | 922 string16* error); |
| 932 bool LoadBackgroundAllowJSAccess( | 923 bool LoadBackgroundAllowJSAccess( |
| 933 const APIPermissionSet& api_permissions, | 924 const APIPermissionSet& api_permissions, |
| 934 string16* error); | 925 string16* error); |
| 935 // Parses a single action in the manifest. | |
| 936 bool LoadWebIntentAction(const std::string& action_name, | |
| 937 const base::DictionaryValue& intent_service, | |
| 938 string16* error); | |
| 939 bool LoadWebIntentServices(string16* error); | |
| 940 bool LoadFileHandler(const std::string& handler_id, | 926 bool LoadFileHandler(const std::string& handler_id, |
| 941 const base::DictionaryValue& handler_info, | 927 const base::DictionaryValue& handler_info, |
| 942 string16* error); | 928 string16* error); |
| 943 bool LoadFileHandlers(string16* error); | 929 bool LoadFileHandlers(string16* error); |
| 944 bool LoadExtensionFeatures(APIPermissionSet* api_permissions, | 930 bool LoadExtensionFeatures(APIPermissionSet* api_permissions, |
| 945 string16* error); | 931 string16* error); |
| 946 bool LoadManifestHandlerFeatures(string16* error); | 932 bool LoadManifestHandlerFeatures(string16* error); |
| 947 bool LoadDevToolsPage(string16* error); | 933 bool LoadDevToolsPage(string16* error); |
| 948 bool LoadInputComponents(const APIPermissionSet& api_permissions, | 934 bool LoadInputComponents(const APIPermissionSet& api_permissions, |
| 949 string16* error); | 935 string16* error); |
| (...skipping 275 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1225 | 1211 |
| 1226 // Should this app be shown in the browser New Tab Page. | 1212 // Should this app be shown in the browser New Tab Page. |
| 1227 bool display_in_new_tab_page_; | 1213 bool display_in_new_tab_page_; |
| 1228 | 1214 |
| 1229 // List of text-to-speech voices that this extension provides, if any. | 1215 // List of text-to-speech voices that this extension provides, if any. |
| 1230 std::vector<TtsVoice> tts_voices_; | 1216 std::vector<TtsVoice> tts_voices_; |
| 1231 | 1217 |
| 1232 // The OAuth2 client id and scopes, if specified by the extension. | 1218 // The OAuth2 client id and scopes, if specified by the extension. |
| 1233 OAuth2Info oauth2_info_; | 1219 OAuth2Info oauth2_info_; |
| 1234 | 1220 |
| 1235 // List of intent services that this extension provides, if any. | |
| 1236 std::vector<webkit_glue::WebIntentServiceData> intents_services_; | |
| 1237 | |
| 1238 // List of file handlers associated with this extension, if any. | 1221 // List of file handlers associated with this extension, if any. |
| 1239 std::vector<FileHandlerInfo> file_handlers_; | 1222 std::vector<FileHandlerInfo> file_handlers_; |
| 1240 | 1223 |
| 1241 // Whether the extension has host permissions or user script patterns that | 1224 // Whether the extension has host permissions or user script patterns that |
| 1242 // imply access to file:/// scheme URLs (the user may not have actually | 1225 // imply access to file:/// scheme URLs (the user may not have actually |
| 1243 // granted it that access). | 1226 // granted it that access). |
| 1244 bool wants_file_access_; | 1227 bool wants_file_access_; |
| 1245 | 1228 |
| 1246 // The flags that were passed to InitFromValue. | 1229 // The flags that were passed to InitFromValue. |
| 1247 int creation_flags_; | 1230 int creation_flags_; |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1314 | 1297 |
| 1315 UpdatedExtensionPermissionsInfo( | 1298 UpdatedExtensionPermissionsInfo( |
| 1316 const Extension* extension, | 1299 const Extension* extension, |
| 1317 const PermissionSet* permissions, | 1300 const PermissionSet* permissions, |
| 1318 Reason reason); | 1301 Reason reason); |
| 1319 }; | 1302 }; |
| 1320 | 1303 |
| 1321 } // namespace extensions | 1304 } // namespace extensions |
| 1322 | 1305 |
| 1323 #endif // CHROME_COMMON_EXTENSIONS_EXTENSION_H_ | 1306 #endif // CHROME_COMMON_EXTENSIONS_EXTENSION_H_ |
| OLD | NEW |