Chromium Code Reviews| Index: chrome/browser/plugins/plugin_observer.h |
| diff --git a/chrome/browser/plugins/plugin_observer.h b/chrome/browser/plugins/plugin_observer.h |
| index 172b06d04ab93393714d2f5b5e789dccba1b3d97..56b8d78a984e5c4c94ef9a2aa2d49c14ada03cf6 100644 |
| --- a/chrome/browser/plugins/plugin_observer.h |
| +++ b/chrome/browser/plugins/plugin_observer.h |
| @@ -25,6 +25,8 @@ class PluginInstaller; |
| class PluginPlaceholderHost; |
| #endif |
| +class ComponentObserver; |
| + |
| namespace content { |
| class WebContents; |
| } |
| @@ -47,6 +49,7 @@ class PluginObserver : public content::WebContentsObserver, |
| private: |
| explicit PluginObserver(content::WebContents* web_contents); |
| friend class content::WebContentsUserData<PluginObserver>; |
| + friend class ComponentObserver; |
|
Bernhard Bauer
2016/07/28 10:25:10
Could you make this an inner class? That way it wo
waffles
2016/07/28 20:06:27
Done.
|
| class PluginPlaceholderHost; |
| @@ -55,9 +58,12 @@ class PluginObserver : public content::WebContentsObserver, |
| const std::string& identifier); |
| void OnBlockedOutdatedPlugin(int placeholder_id, |
| const std::string& identifier); |
| + void OnBlockedUpdatePlugin(int placeholder_id, |
| + const std::string& identifier); |
| #if defined(ENABLE_PLUGIN_INSTALLATION) |
| void OnRemovePluginPlaceholderHost(int placeholder_id); |
| #endif |
| + void RemoveComponentObserver(int placeholder_id); |
| void OnOpenAboutPlugins(); |
| void OnCouldNotLoadPlugin(const base::FilePath& plugin_path); |
| @@ -66,6 +72,9 @@ class PluginObserver : public content::WebContentsObserver, |
| std::map<int, PluginPlaceholderHost*> plugin_placeholders_; |
| #endif |
| + // Stores all PluginPlaceholderHosts, keyed by their routing ID. |
|
Bernhard Bauer
2016/07/28 10:25:10
Nit: stores all ComponentObservers?
waffles
2016/07/28 20:06:27
Done.
|
| + std::map<int, ComponentObserver*> component_observers_; |
|
Bernhard Bauer
2016/07/28 10:25:10
This map could store unique_ptr<>'s now (|plugin_p
waffles
2016/07/28 20:06:27
Done.
|
| + |
| base::WeakPtrFactory<PluginObserver> weak_ptr_factory_; |
| DISALLOW_COPY_AND_ASSIGN(PluginObserver); |