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

Unified Diff: chrome/browser/external_protocol/external_protocol_observer.h

Issue 10961053: Switch ExternalProtocolObserver to use WebContentsUserData. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase 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 | « no previous file | chrome/browser/external_protocol/external_protocol_observer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/external_protocol/external_protocol_observer.h
diff --git a/chrome/browser/external_protocol/external_protocol_observer.h b/chrome/browser/external_protocol/external_protocol_observer.h
index 4f6c1ff9d00b974aa325fd3ffc59970c1bf50a69..e031804e6f7166292f225afee1dde6305cd76668 100644
--- a/chrome/browser/external_protocol/external_protocol_observer.h
+++ b/chrome/browser/external_protocol/external_protocol_observer.h
@@ -5,19 +5,25 @@
#ifndef CHROME_BROWSER_EXTERNAL_PROTOCOL_EXTERNAL_PROTOCOL_OBSERVER_H_
#define CHROME_BROWSER_EXTERNAL_PROTOCOL_EXTERNAL_PROTOCOL_OBSERVER_H_
+#include "chrome/browser/tab_contents/web_contents_user_data.h"
#include "content/public/browser/web_contents_observer.h"
// ExternalProtocolObserver is responsible for handling messages from
// WebContents relating to external protocols.
-class ExternalProtocolObserver : public content::WebContentsObserver {
+class ExternalProtocolObserver
+ : public content::WebContentsObserver,
+ public WebContentsUserData<ExternalProtocolObserver> {
public:
- explicit ExternalProtocolObserver(content::WebContents* web_contents);
virtual ~ExternalProtocolObserver();
// content::WebContentsObserver overrides.
virtual void DidGetUserGesture() OVERRIDE;
private:
+ explicit ExternalProtocolObserver(content::WebContents* web_contents);
+ static int kUserDataKey;
+ friend class WebContentsUserData<ExternalProtocolObserver>;
+
DISALLOW_COPY_AND_ASSIGN(ExternalProtocolObserver);
};
« no previous file with comments | « no previous file | chrome/browser/external_protocol/external_protocol_observer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698