| OLD | NEW | 
|---|
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 <map> | 8 #include <map> | 
| 9 #include <set> | 9 #include <set> | 
| 10 #include <string> | 10 #include <string> | 
| (...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 184   const Location location() const { return location_; } | 184   const Location location() const { return location_; } | 
| 185   void set_location(Location location) { location_ = location; } | 185   void set_location(Location location) { location_ = location; } | 
| 186   const std::string& id() const { return id_; } | 186   const std::string& id() const { return id_; } | 
| 187   const Version* version() const { return version_.get(); } | 187   const Version* version() const { return version_.get(); } | 
| 188   // String representation of the version number. | 188   // String representation of the version number. | 
| 189   const std::string VersionString() const; | 189   const std::string VersionString() const; | 
| 190   const std::string& name() const { return name_; } | 190   const std::string& name() const { return name_; } | 
| 191   const std::string& public_key() const { return public_key_; } | 191   const std::string& public_key() const { return public_key_; } | 
| 192   const std::string& description() const { return description_; } | 192   const std::string& description() const { return description_; } | 
| 193   const UserScriptList& content_scripts() const { return content_scripts_; } | 193   const UserScriptList& content_scripts() const { return content_scripts_; } | 
| 194   ExtensionAction* page_action() const { return page_action_.get(); } | 194   ExtensionAction2* page_action() const { return page_action_.get(); } | 
| 195   ExtensionAction2* browser_action() const { return browser_action_.get(); } | 195   ExtensionAction2* browser_action() const { return browser_action_.get(); } | 
| 196   const std::vector<PrivacyBlacklistInfo>& privacy_blacklists() const { | 196   const std::vector<PrivacyBlacklistInfo>& privacy_blacklists() const { | 
| 197     return privacy_blacklists_; | 197     return privacy_blacklists_; | 
| 198   } | 198   } | 
| 199   const std::vector<PluginInfo>& plugins() const { return plugins_; } | 199   const std::vector<PluginInfo>& plugins() const { return plugins_; } | 
| 200   const GURL& background_url() const { return background_url_; } | 200   const GURL& background_url() const { return background_url_; } | 
| 201   const GURL& options_url() const { return options_url_; } | 201   const GURL& options_url() const { return options_url_; } | 
| 202   const std::vector<ToolstripInfo>& toolstrips() const { return toolstrips_; } | 202   const std::vector<ToolstripInfo>& toolstrips() const { return toolstrips_; } | 
| 203   const std::vector<std::string>& api_permissions() const { | 203   const std::vector<std::string>& api_permissions() const { | 
| 204     return api_permissions_; | 204     return api_permissions_; | 
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 274  private: | 274  private: | 
| 275   // Helper method that loads a UserScript object from a | 275   // Helper method that loads a UserScript object from a | 
| 276   // dictionary in the content_script list of the manifest. | 276   // dictionary in the content_script list of the manifest. | 
| 277   bool LoadUserScriptHelper(const DictionaryValue* content_script, | 277   bool LoadUserScriptHelper(const DictionaryValue* content_script, | 
| 278                             int definition_index, | 278                             int definition_index, | 
| 279                             std::string* error, | 279                             std::string* error, | 
| 280                             UserScript* result); | 280                             UserScript* result); | 
| 281 | 281 | 
| 282   // Helper method that loads a ExtensionAction object from a | 282   // Helper method that loads a ExtensionAction object from a | 
| 283   // dictionary in the page_action or browser_action section of the manifest. | 283   // dictionary in the page_action or browser_action section of the manifest. | 
| 284   ExtensionAction* LoadExtensionActionHelper( | 284   ExtensionAction2* LoadExtensionActionHelper( | 
| 285       const DictionaryValue* contextual_action, | 285       const DictionaryValue* contextual_action, | 
| 286       std::string* error, | 286       std::string* error, | 
| 287       ExtensionAction::ExtensionActionType action_type); | 287       ExtensionAction::ExtensionActionType action_type); | 
| 288 | 288 | 
| 289   // Helper method to load an ExtensionAction2 from the page_action or | 289   // Helper method to load an ExtensionAction2 from the page_action or | 
| 290   // browser_action entries in the manifest. | 290   // browser_action entries in the manifest. | 
| 291   // TODO(aa): ExtensionAction2 should replace ExtensionAction completely. | 291   // TODO(aa): ExtensionAction2 should replace ExtensionAction completely. | 
| 292   ExtensionAction2* LoadExtensionAction2Helper( | 292   ExtensionAction2* LoadExtensionAction2Helper( | 
| 293       const DictionaryValue* extension_action, std::string* error); | 293       const DictionaryValue* extension_action, std::string* error); | 
| 294 | 294 | 
| (...skipping 24 matching lines...) Expand all  Loading... | 
| 319   // The extension's human-readable name. | 319   // The extension's human-readable name. | 
| 320   std::string name_; | 320   std::string name_; | 
| 321 | 321 | 
| 322   // An optional longer description of the extension. | 322   // An optional longer description of the extension. | 
| 323   std::string description_; | 323   std::string description_; | 
| 324 | 324 | 
| 325   // Paths to the content scripts the extension contains. | 325   // Paths to the content scripts the extension contains. | 
| 326   UserScriptList content_scripts_; | 326   UserScriptList content_scripts_; | 
| 327 | 327 | 
| 328   // The extension's page action, if any. | 328   // The extension's page action, if any. | 
| 329   scoped_ptr<ExtensionAction> page_action_; | 329   scoped_ptr<ExtensionAction2> page_action_; | 
| 330 | 330 | 
| 331   // The extension's browser action, if any. | 331   // The extension's browser action, if any. | 
| 332   scoped_ptr<ExtensionAction2> browser_action_; | 332   scoped_ptr<ExtensionAction2> browser_action_; | 
| 333 | 333 | 
| 334   // Optional list of privacy blacklistrom. | 334   // Optional list of privacy blacklistrom. | 
| 335   std::vector<PrivacyBlacklistInfo> privacy_blacklists_; | 335   std::vector<PrivacyBlacklistInfo> privacy_blacklists_; | 
| 336 | 336 | 
| 337   // Optional list of NPAPI plugins and associated properties. | 337   // Optional list of NPAPI plugins and associated properties. | 
| 338   std::vector<PluginInfo> plugins_; | 338   std::vector<PluginInfo> plugins_; | 
| 339 | 339 | 
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 392 | 392 | 
| 393   // True if the background page is ready. | 393   // True if the background page is ready. | 
| 394   bool background_page_ready_; | 394   bool background_page_ready_; | 
| 395 | 395 | 
| 396   FRIEND_TEST(ExtensionTest, LoadPageActionHelper); | 396   FRIEND_TEST(ExtensionTest, LoadPageActionHelper); | 
| 397 | 397 | 
| 398   DISALLOW_COPY_AND_ASSIGN(Extension); | 398   DISALLOW_COPY_AND_ASSIGN(Extension); | 
| 399 }; | 399 }; | 
| 400 | 400 | 
| 401 #endif  // CHROME_COMMON_EXTENSIONS_EXTENSION_H_ | 401 #endif  // CHROME_COMMON_EXTENSIONS_EXTENSION_H_ | 
| OLD | NEW | 
|---|