diff options
author | raymes@chromium.org <raymes@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-12-10 19:28:46 +0000 |
---|---|---|
committer | raymes@chromium.org <raymes@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-12-10 19:28:46 +0000 |
commit | 83d12c8ddc0ce79975db70edb0ffd35305f49ee2 (patch) | |
tree | 79bd1b1125f32b97616d9b1ca7ad2555d6fa1e04 /content/public | |
parent | e981b3fa852cdbf3bb098e4ebf2d1def635b90c2 (diff) | |
download | chromium_src-83d12c8ddc0ce79975db70edb0ffd35305f49ee2.zip chromium_src-83d12c8ddc0ce79975db70edb0ffd35305f49ee2.tar.gz chromium_src-83d12c8ddc0ce79975db70edb0ffd35305f49ee2.tar.bz2 |
Implement an IsAllowed function in the pepper PPB_Broker_Trusted API
Flash sometimes needs to synchronously know if it can launch the broker, otherwise it will try to launch the broker when it shouldn't, and end up popping an infobar. This adds an IsAllowed function to synchronously test whether the broker is allowed to launch without popping the infobar.
Note that the document URL of the plugin instance is needed in order to check the broker permissions in the browser process. This is only available in the renderer process. In order to avoid an extra hop to the renderer process just to get this URL, it is sent to the browser (with the render view ID) upon initialization of the instance when the instance is registered with the browser process.
BUG=163248
Review URL: https://chromiumcodereview.appspot.com/11316316
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@172104 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/public')
-rw-r--r-- | content/public/browser/browser_ppapi_host.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/content/public/browser/browser_ppapi_host.h b/content/public/browser/browser_ppapi_host.h index f5aa11c..08c5f07 100644 --- a/content/public/browser/browser_ppapi_host.h +++ b/content/public/browser/browser_ppapi_host.h @@ -10,6 +10,7 @@ #include "content/common/content_export.h" #include "content/public/browser/browser_thread.h" #include "content/public/browser/render_view_host.h" +#include "googleurl/src/gurl.h" #include "ppapi/c/pp_instance.h" namespace IPC { @@ -72,11 +73,16 @@ class CONTENT_EXPORT BrowserPpapiHost { virtual bool GetRenderViewIDsForInstance(PP_Instance instance, int* render_process_id, int* render_view_id) const = 0; + // Returns the name of the plugin. virtual const std::string& GetPluginName() = 0; // Returns the user's profile data directory. virtual const FilePath& GetProfileDataDirectory() = 0; + + // Get the Document/Plugin URLs for the given PP_Instance. + virtual GURL GetDocumentURLForInstance(PP_Instance instance) = 0; + virtual GURL GetPluginURLForInstance(PP_Instance instance) = 0; }; } // namespace content |