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

Unified Diff: ppapi/proxy/ppb_instance_proxy.cc

Issue 23444004: Add GetPluginRefererURL to PPB_URLUtil_Dev interface to get the 'Referer' HTTP header value that wa… (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: Created 7 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 | « ppapi/proxy/ppb_instance_proxy.h ('k') | ppapi/tests/test_url_util.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ppapi/proxy/ppb_instance_proxy.cc
===================================================================
--- ppapi/proxy/ppb_instance_proxy.cc (revision 221828)
+++ ppapi/proxy/ppb_instance_proxy.cc (working copy)
@@ -173,6 +173,8 @@
OnHostMsgDocumentCanAccessDocument)
IPC_MESSAGE_HANDLER(PpapiHostMsg_PPBInstance_GetPluginInstanceURL,
OnHostMsgGetPluginInstanceURL)
+ IPC_MESSAGE_HANDLER(PpapiHostMsg_PPBInstance_GetPluginReferrerURL,
+ OnHostMsgGetPluginReferrerURL)
IPC_MESSAGE_HANDLER(PpapiHostMsg_PPBInstance_NeedKey,
OnHostMsgNeedKey)
IPC_MESSAGE_HANDLER(PpapiHostMsg_PPBInstance_KeyAdded,
@@ -526,6 +528,17 @@
components);
}
+PP_Var PPB_Instance_Proxy::GetPluginReferrerURL(
+ PP_Instance instance,
+ PP_URLComponents_Dev* components) {
+ ReceiveSerializedVarReturnValue result;
+ dispatcher()->Send(new PpapiHostMsg_PPBInstance_GetPluginReferrerURL(
+ API_ID_PPB_INSTANCE, instance, &result));
+ return PPB_URLUtil_Shared::ConvertComponentsAndReturnURL(
+ result.Return(dispatcher()),
+ components);
+}
+
void PPB_Instance_Proxy::NeedKey(PP_Instance instance,
PP_Var key_system,
PP_Var session_id,
@@ -1032,6 +1045,18 @@
}
}
+void PPB_Instance_Proxy::OnHostMsgGetPluginReferrerURL(
+ PP_Instance instance,
+ SerializedVarReturnValue result) {
+ if (!dispatcher()->permissions().HasPermission(PERMISSION_DEV))
+ return;
+ EnterInstanceNoLock enter(instance);
+ if (enter.succeeded()) {
+ result.Return(dispatcher(),
+ enter.functions()->GetPluginReferrerURL(instance, NULL));
+ }
+}
+
void PPB_Instance_Proxy::OnHostMsgNeedKey(PP_Instance instance,
SerializedVarReceiveInput key_system,
SerializedVarReceiveInput session_id,
« no previous file with comments | « ppapi/proxy/ppb_instance_proxy.h ('k') | ppapi/tests/test_url_util.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698