summaryrefslogtreecommitdiffstats
path: root/content/public
diff options
context:
space:
mode:
authorbauerb@chromium.org <bauerb@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-11-23 18:57:16 +0000
committerbauerb@chromium.org <bauerb@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-11-23 18:57:16 +0000
commit8c8fc29e21510bfd89bef9d2e4301270e4aa91a0 (patch)
tree1b5f36252be42cad3e308dbf91d015a40673b944 /content/public
parent7452c1cc4e6c88305b3f221beb0ba0244b2afcee (diff)
downloadchromium_src-8c8fc29e21510bfd89bef9d2e4301270e4aa91a0.zip
chromium_src-8c8fc29e21510bfd89bef9d2e4301270e4aa91a0.tar.gz
chromium_src-8c8fc29e21510bfd89bef9d2e4301270e4aa91a0.tar.bz2
Move RequestPpapiBrokerPermission from WebContentsObserver to WebContentsDelegate.
TBR=joth@chromium.org BUG=142639 Review URL: https://chromiumcodereview.appspot.com/11416013 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@169360 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/public')
-rw-r--r--content/public/browser/web_contents_delegate.cc8
-rw-r--r--content/public/browser/web_contents_delegate.h9
-rw-r--r--content/public/browser/web_contents_observer.cc8
-rw-r--r--content/public/browser/web_contents_observer.h13
4 files changed, 17 insertions, 21 deletions
diff --git a/content/public/browser/web_contents_delegate.cc b/content/public/browser/web_contents_delegate.cc
index 09488ff..e617e82 100644
--- a/content/public/browser/web_contents_delegate.cc
+++ b/content/public/browser/web_contents_delegate.cc
@@ -145,6 +145,14 @@ void WebContentsDelegate::WebIntentDispatch(
delete intents_dispatcher;
}
+bool WebContentsDelegate::RequestPpapiBrokerPermission(
+ WebContents* web_contents,
+ const GURL& url,
+ const FilePath& plugin_path,
+ const base::Callback<void(bool)>& callback) {
+ return false;
+}
+
WebContentsDelegate::~WebContentsDelegate() {
while (!attached_contents_.empty()) {
WebContents* web_contents = *attached_contents_.begin();
diff --git a/content/public/browser/web_contents_delegate.h b/content/public/browser/web_contents_delegate.h
index c8e4256..db63498b 100644
--- a/content/public/browser/web_contents_delegate.h
+++ b/content/public/browser/web_contents_delegate.h
@@ -422,6 +422,15 @@ class CONTENT_EXPORT WebContentsDelegate {
const MediaStreamRequest* request,
const MediaResponseCallback& callback) {}
+ // Requests permission to access the PPAPI broker. The delegate should return
+ // true and call the passed in |callback| with the result, or return false
+ // to indicate that it does not support asking for permission.
+ virtual bool RequestPpapiBrokerPermission(
+ WebContents* web_contents,
+ const GURL& url,
+ const FilePath& plugin_path,
+ const base::Callback<void(bool)>& callback);
+
protected:
virtual ~WebContentsDelegate();
diff --git a/content/public/browser/web_contents_observer.cc b/content/public/browser/web_contents_observer.cc
index f40db1d..1479029 100644
--- a/content/public/browser/web_contents_observer.cc
+++ b/content/public/browser/web_contents_observer.cc
@@ -37,14 +37,6 @@ void WebContentsObserver::Observe(WebContents* web_contents) {
}
}
-bool WebContentsObserver::RequestPpapiBrokerPermission(
- WebContents* web_contents,
- const GURL& url,
- const FilePath& plugin_path,
- const base::Callback<void(bool)>& callback) {
- return false;
-}
-
bool WebContentsObserver::OnMessageReceived(const IPC::Message& message) {
return false;
}
diff --git a/content/public/browser/web_contents_observer.h b/content/public/browser/web_contents_observer.h
index 93565da..14c7e77 100644
--- a/content/public/browser/web_contents_observer.h
+++ b/content/public/browser/web_contents_observer.h
@@ -5,7 +5,6 @@
#ifndef CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_OBSERVER_H_
#define CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_OBSERVER_H_
-#include "base/callback_forward.h"
#include "base/process_util.h"
#include "content/common/content_export.h"
#include "content/public/browser/navigation_controller.h"
@@ -138,18 +137,6 @@ class CONTENT_EXPORT WebContentsObserver : public IPC::Listener,
// Called when the user agent override for a WebContents has been changed.
virtual void UserAgentOverrideSet(const std::string& user_agent) {}
- // Requests permission to access the PPAPI broker. If the object handles the
- // request, it should return true and eventually call the passed in |callback|
- // with the result. Otherwise it should return false, in which case the next
- // observer will be called.
- // Implementations should make sure not to call the callback after the
- // WebContents has been destroyed.
- virtual bool RequestPpapiBrokerPermission(
- WebContents* web_contents,
- const GURL& url,
- const FilePath& plugin_path,
- const base::Callback<void(bool)>& callback);
-
// Indicates that client 3D APIs (Pepper 3D, WebGL) were just
// blocked on the current page, specifically because the GPU was
// reset recently.