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

Side by Side 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, 2 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/browser/pepper_broker_observer.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_PEPPER_BROKER_OBSERVER_H_ 5 #ifndef CHROME_BROWSER_PEPPER_BROKER_OBSERVER_H_
6 #define CHROME_BROWSER_PEPPER_BROKER_OBSERVER_H_ 6 #define CHROME_BROWSER_PEPPER_BROKER_OBSERVER_H_
7 7
8 #include "chrome/browser/tab_contents/web_contents_user_data.h"
8 #include "content/public/browser/web_contents_observer.h" 9 #include "content/public/browser/web_contents_observer.h"
9 10
10 class PepperBrokerObserver : public content::WebContentsObserver { 11 class PepperBrokerObserver : public content::WebContentsObserver,
12 public WebContentsUserData<PepperBrokerObserver> {
11 public: 13 public:
14 virtual ~PepperBrokerObserver();
15
16 private:
12 explicit PepperBrokerObserver(content::WebContents* web_contents); 17 explicit PepperBrokerObserver(content::WebContents* web_contents);
13 virtual ~PepperBrokerObserver(); 18 static int kUserDataKey;
19 friend class WebContentsUserData<PepperBrokerObserver>;
14 20
15 virtual bool RequestPpapiBrokerPermission( 21 virtual bool RequestPpapiBrokerPermission(
16 content::WebContents* web_contents, 22 content::WebContents* web_contents,
17 const GURL& url, 23 const GURL& url,
18 const FilePath& plugin_path, 24 const FilePath& plugin_path,
19 const base::Callback<void(bool)>& callback) OVERRIDE; 25 const base::Callback<void(bool)>& callback) OVERRIDE;
20 26
21 private:
22 DISALLOW_COPY_AND_ASSIGN(PepperBrokerObserver); 27 DISALLOW_COPY_AND_ASSIGN(PepperBrokerObserver);
23 }; 28 };
24 29
25 #endif // CHROME_BROWSER_PEPPER_BROKER_OBSERVER_H_ 30 #endif // CHROME_BROWSER_PEPPER_BROKER_OBSERVER_H_
OLDNEW
« 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