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

Unified Diff: chrome/browser/pepper_broker_observer.h

Issue 10987054: Switch PepperBrokerObserver 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 | « no previous file | chrome/browser/pepper_broker_observer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/pepper_broker_observer.h
diff --git a/chrome/browser/pepper_broker_observer.h b/chrome/browser/pepper_broker_observer.h
index e49d962fcab8ff6eadf8f55d28b33e9bb9efee69..01f84bfb0117364d17f0d909aa8f27b1c12ee21e 100644
--- a/chrome/browser/pepper_broker_observer.h
+++ b/chrome/browser/pepper_broker_observer.h
@@ -5,20 +5,25 @@
#ifndef CHROME_BROWSER_PEPPER_BROKER_OBSERVER_H_
#define CHROME_BROWSER_PEPPER_BROKER_OBSERVER_H_
+#include "chrome/browser/tab_contents/web_contents_user_data.h"
#include "content/public/browser/web_contents_observer.h"
-class PepperBrokerObserver : public content::WebContentsObserver {
+class PepperBrokerObserver : public content::WebContentsObserver,
+ public WebContentsUserData<PepperBrokerObserver> {
public:
- explicit PepperBrokerObserver(content::WebContents* web_contents);
virtual ~PepperBrokerObserver();
+ private:
+ explicit PepperBrokerObserver(content::WebContents* web_contents);
+ static int kUserDataKey;
+ friend class WebContentsUserData<PepperBrokerObserver>;
+
virtual bool RequestPpapiBrokerPermission(
content::WebContents* web_contents,
const GURL& url,
const FilePath& plugin_path,
const base::Callback<void(bool)>& callback) OVERRIDE;
- private:
DISALLOW_COPY_AND_ASSIGN(PepperBrokerObserver);
};
« no previous file with comments | « no previous file | chrome/browser/pepper_broker_observer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698