diff options
author | jam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-04-05 21:16:58 +0000 |
---|---|---|
committer | jam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-04-05 21:16:58 +0000 |
commit | 2de307599d70dacc116ae10b84bb6860c7fdff4b (patch) | |
tree | 32d65901328da47f46df8309b0c0c264c23fc1c0 /content/browser/plugin_service.h | |
parent | 77b6731e1d204a260b64d4c09c827bd2d600154e (diff) | |
download | chromium_src-2de307599d70dacc116ae10b84bb6860c7fdff4b.zip chromium_src-2de307599d70dacc116ae10b84bb6860c7fdff4b.tar.gz chromium_src-2de307599d70dacc116ae10b84bb6860c7fdff4b.tar.bz2 |
Remove last extension related code in content\browser. Have the ExtensionService manage what to do when extensions with plugins are installed, as opposed to in PluginService which being in content shouldn't know about extensions.
BUG=76789
Review URL: http://codereview.chromium.org/6720053
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@80528 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/browser/plugin_service.h')
-rw-r--r-- | content/browser/plugin_service.h | 25 |
1 files changed, 18 insertions, 7 deletions
diff --git a/content/browser/plugin_service.h b/content/browser/plugin_service.h index 952760f..2bc31b7 100644 --- a/content/browser/plugin_service.h +++ b/content/browser/plugin_service.h @@ -114,12 +114,23 @@ class PluginService webkit::npapi::WebPluginInfo* info, std::string* actual_mime_type); + // Safe to be called from any thread. + void OverridePluginForTab(const OverriddenPlugin& plugin); + + // Restricts the given plugin to the the scheme and host of the given url. + // Call with an empty url to reset this. + // Can be called on any thread. + void RestrictPluginToUrl(const FilePath& plugin_path, const GURL& url); + // Returns true if the given plugin is allowed to be used by a page with // the given URL. - bool PrivatePluginAllowedForURL(const FilePath& plugin_path, const GURL& url); + // Can be called on any thread. + bool PluginAllowedForURL(const FilePath& plugin_path, const GURL& url); - // Safe to be called from any thread. - void OverridePluginForTab(const OverriddenPlugin& plugin); + // Tells all the renderer processes to throw away their cache of the plugin + // list, and optionally also reload all the pages with plugins. + // NOTE: can only be called on the UI thread. + static void PurgePluginListCache(bool reload_pages); // The UI thread's message loop MessageLoop* main_message_loop() { return main_message_loop_; } @@ -176,10 +187,10 @@ class PluginService // The browser's UI locale. const std::string ui_locale_; - // Map of plugin paths to the origin they are restricted to. Used for - // extension-only plugins. - typedef base::hash_map<FilePath, GURL> PrivatePluginMap; - PrivatePluginMap private_plugins_; + // Map of plugin paths to the origin they are restricted to. + base::Lock restricted_plugin_lock_; // Guards access to restricted_plugin_. + typedef base::hash_map<FilePath, GURL> RestrictedPluginMap; + RestrictedPluginMap restricted_plugin_; NotificationRegistrar registrar_; |