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

Unified Diff: chrome/browser/ui/hung_plugin_tab_helper.h

Issue 10968043: Switch HungPluginTabHelper to use WebContentsUserData. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 3 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/ui/browser.cc ('k') | chrome/browser/ui/hung_plugin_tab_helper.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/hung_plugin_tab_helper.h
diff --git a/chrome/browser/ui/hung_plugin_tab_helper.h b/chrome/browser/ui/hung_plugin_tab_helper.h
index 01795ea790908463f2947fafe06dfa639933d6f1..7e294c12b3e1c0998d4283fe4429dab44b03bf8d 100644
--- a/chrome/browser/ui/hung_plugin_tab_helper.h
+++ b/chrome/browser/ui/hung_plugin_tab_helper.h
@@ -12,6 +12,7 @@
#include "base/string16.h"
#include "base/time.h"
#include "base/timer.h"
+#include "chrome/browser/tab_contents/web_contents_user_data.h"
#include "content/public/browser/notification_observer.h"
#include "content/public/browser/notification_registrar.h"
#include "content/public/browser/web_contents_observer.h"
@@ -32,9 +33,9 @@ class InfoBarTabHelper;
// - Hide the infobar if the plugin starts responding again.
// - Keep track of all of this for any number of plugins.
class HungPluginTabHelper : public content::WebContentsObserver,
- public content::NotificationObserver {
+ public content::NotificationObserver,
+ public WebContentsUserData<HungPluginTabHelper> {
public:
- explicit HungPluginTabHelper(content::WebContents* contents);
virtual ~HungPluginTabHelper();
// content::WebContentsObserver overrides:
@@ -49,6 +50,10 @@ class HungPluginTabHelper : public content::WebContentsObserver,
const content::NotificationDetails& details) OVERRIDE;
private:
+ explicit HungPluginTabHelper(content::WebContents* contents);
+ static int kUserDataKey;
+ friend class WebContentsUserData<HungPluginTabHelper>;
+
class InfoBarDelegate;
friend class InfoBarDelegate;
« no previous file with comments | « chrome/browser/ui/browser.cc ('k') | chrome/browser/ui/hung_plugin_tab_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698