Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2528)

Unified Diff: chrome/browser/plugins/plugin_observer.h

Issue 2154773002: Implement Just-In-Time Flash updates. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: First Review Pass Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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);

Powered by Google App Engine
This is Rietveld 408576698