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

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: git pull && gclient sync 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
« no previous file with comments | « chrome/browser/plugins/plugin_info_message_filter.cc ('k') | chrome/browser/plugins/plugin_observer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..110f777ffff52dc5ccb61d0f8e246757be1a2a41 100644
--- a/chrome/browser/plugins/plugin_observer.h
+++ b/chrome/browser/plugins/plugin_observer.h
@@ -6,9 +6,11 @@
#define CHROME_BROWSER_PLUGINS_PLUGIN_OBSERVER_H_
#include <memory>
+#include <string>
#include "base/macros.h"
#include "base/memory/weak_ptr.h"
+#include "components/component_updater/component_updater_service.h"
#include "content/public/browser/web_contents_observer.h"
#include "content/public/browser/web_contents_user_data.h"
@@ -45,6 +47,7 @@ class PluginObserver : public content::WebContentsObserver,
content::RenderFrameHost* render_frame_host) override;
private:
+ class ComponentObserver;
explicit PluginObserver(content::WebContents* web_contents);
friend class content::WebContentsUserData<PluginObserver>;
@@ -55,9 +58,12 @@ class PluginObserver : public content::WebContentsObserver,
const std::string& identifier);
void OnBlockedOutdatedPlugin(int placeholder_id,
const std::string& identifier);
+ void OnBlockedComponentUpdatedPlugin(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 ComponentObservers, keyed by their routing ID.
+ std::map<int, std::unique_ptr<ComponentObserver>> component_observers_;
+
base::WeakPtrFactory<PluginObserver> weak_ptr_factory_;
DISALLOW_COPY_AND_ASSIGN(PluginObserver);
« no previous file with comments | « chrome/browser/plugins/plugin_info_message_filter.cc ('k') | chrome/browser/plugins/plugin_observer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698