summaryrefslogtreecommitdiffstats
path: root/content/public
diff options
context:
space:
mode:
authorbauerb@chromium.org <bauerb@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-08-23 14:40:50 +0000
committerbauerb@chromium.org <bauerb@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-08-23 14:40:50 +0000
commitd8415ad900d21b08c678bc7b06b2e81581311f71 (patch)
treea22de25afa5b134c071284fe5823fb2b47033c26 /content/public
parent574b04420530b62321e47610e7edbcac2165830e (diff)
downloadchromium_src-d8415ad900d21b08c678bc7b06b2e81581311f71.zip
chromium_src-d8415ad900d21b08c678bc7b06b2e81581311f71.tar.gz
chromium_src-d8415ad900d21b08c678bc7b06b2e81581311f71.tar.bz2
Add hooks to content to request permission to connect to the PPAPI broker.
BUG=142639 TEST=browser_tests:PPAPITest.Broker Review URL: https://chromiumcodereview.appspot.com/10854040 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@152991 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/public')
-rw-r--r--content/public/browser/web_contents_observer.cc8
-rw-r--r--content/public/browser/web_contents_observer.h13
2 files changed, 21 insertions, 0 deletions
diff --git a/content/public/browser/web_contents_observer.cc b/content/public/browser/web_contents_observer.cc
index 1479029..f40db1d 100644
--- a/content/public/browser/web_contents_observer.cc
+++ b/content/public/browser/web_contents_observer.cc
@@ -37,6 +37,14 @@ 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 99fc805..ae81b55 100644
--- a/content/public/browser/web_contents_observer.h
+++ b/content/public/browser/web_contents_observer.h
@@ -5,6 +5,7 @@
#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"
@@ -129,6 +130,18 @@ 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);
+
// IPC::Listener implementation.
virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE;