summaryrefslogtreecommitdiffstats
path: root/ppapi/proxy
diff options
context:
space:
mode:
authorpiman@google.com <piman@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2011-03-31 21:46:45 +0000
committerpiman@google.com <piman@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2011-03-31 21:46:45 +0000
commit087ce7477bfbc656e7ce8931d6036b7b179f85b8 (patch)
treef3a8d4f9eb41bb7ca9f7fc373d9df9603a1fc5d6 /ppapi/proxy
parent4a4546fb749ca2e205b318bb68bcdf3baeb2213e (diff)
downloadchromium_src-087ce7477bfbc656e7ce8931d6036b7b179f85b8.zip
chromium_src-087ce7477bfbc656e7ce8931d6036b7b179f85b8.tar.gz
chromium_src-087ce7477bfbc656e7ce8931d6036b7b179f85b8.tar.bz2
Add GetPluginURL to PPB_URLUtil_Dev
BUG=chromium-os:13693 TEST=http://www.ford.com/cars/taurus/ with pepper flash Review URL: http://codereview.chromium.org/6740013 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@80085 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ppapi/proxy')
-rw-r--r--ppapi/proxy/ppapi_messages.h3
-rw-r--r--ppapi/proxy/ppb_url_util_proxy.cc23
-rw-r--r--ppapi/proxy/ppb_url_util_proxy.h2
3 files changed, 27 insertions, 1 deletions
diff --git a/ppapi/proxy/ppapi_messages.h b/ppapi/proxy/ppapi_messages.h
index d40c5a46..fad4e8b 100644
--- a/ppapi/proxy/ppapi_messages.h
+++ b/ppapi/proxy/ppapi_messages.h
@@ -689,6 +689,9 @@ IPC_SYNC_MESSAGE_ROUTED2_1(PpapiHostMsg_PPBURLUtil_DocumentCanAccessDocument,
IPC_SYNC_MESSAGE_ROUTED1_1(PpapiHostMsg_PPBURLUtil_GetDocumentURL,
PP_Instance /* active */,
pp::proxy::SerializedVar /* result */)
+IPC_SYNC_MESSAGE_ROUTED1_1(PpapiHostMsg_PPBURLUtil_GetPluginInstanceURL,
+ PP_Instance /* active */,
+ pp::proxy::SerializedVar /* result */)
// PPB_Var.
IPC_MESSAGE_ROUTED1(PpapiHostMsg_PPBVar_AddRefObject,
diff --git a/ppapi/proxy/ppb_url_util_proxy.cc b/ppapi/proxy/ppb_url_util_proxy.cc
index bcff053..17b36ea 100644
--- a/ppapi/proxy/ppb_url_util_proxy.cc
+++ b/ppapi/proxy/ppb_url_util_proxy.cc
@@ -120,6 +120,18 @@ PP_Var GetDocumentURL(PP_Instance instance,
return ConvertComponentsAndReturnURL(result.Return(dispatcher), components);
}
+PP_Var GetPluginInstanceURL(PP_Instance instance,
+ struct PP_URLComponents_Dev* components) {
+ PluginDispatcher* dispatcher = PluginDispatcher::GetForInstance(instance);
+ if (!dispatcher)
+ return PP_MakeNull();
+
+ ReceiveSerializedVarReturnValue result;
+ dispatcher->Send(new PpapiHostMsg_PPBURLUtil_GetPluginInstanceURL(
+ INTERFACE_ID_PPB_URL_UTIL, instance, &result));
+ return ConvertComponentsAndReturnURL(result.Return(dispatcher), components);
+}
+
const PPB_URLUtil_Dev url_util_interface = {
&Canonicalize,
&ResolveRelativeToURL,
@@ -127,7 +139,8 @@ const PPB_URLUtil_Dev url_util_interface = {
&IsSameSecurityOrigin,
&DocumentCanRequest,
&DocumentCanAccessDocument,
- &GetDocumentURL
+ &GetDocumentURL,
+ &GetPluginInstanceURL
};
InterfaceProxy* CreateURLUtilProxy(Dispatcher* dispatcher,
@@ -168,6 +181,8 @@ bool PPB_URLUtil_Proxy::OnMessageReceived(const IPC::Message& msg) {
OnMsgDocumentCanAccessDocument)
IPC_MESSAGE_HANDLER(PpapiHostMsg_PPBURLUtil_GetDocumentURL,
OnMsgGetDocumentURL)
+ IPC_MESSAGE_HANDLER(PpapiHostMsg_PPBURLUtil_GetPluginInstanceURL,
+ OnMsgGetPluginInstanceURL)
IPC_MESSAGE_UNHANDLED(handled = false)
IPC_END_MESSAGE_MAP()
return handled;
@@ -202,6 +217,12 @@ void PPB_URLUtil_Proxy::OnMsgGetDocumentURL(PP_Instance instance,
ppb_url_util_target()->GetDocumentURL(instance, NULL));
}
+void PPB_URLUtil_Proxy::OnMsgGetPluginInstanceURL(
+ PP_Instance instance, SerializedVarReturnValue result) {
+ result.Return(dispatcher(),
+ ppb_url_util_target()->GetPluginInstanceURL(instance, NULL));
+}
+
} // namespace proxy
} // namespace pp
diff --git a/ppapi/proxy/ppb_url_util_proxy.h b/ppapi/proxy/ppb_url_util_proxy.h
index 2d4e001..548d2ef 100644
--- a/ppapi/proxy/ppb_url_util_proxy.h
+++ b/ppapi/proxy/ppb_url_util_proxy.h
@@ -41,6 +41,8 @@ class PPB_URLUtil_Proxy : public InterfaceProxy {
PP_Bool* result);
void OnMsgGetDocumentURL(PP_Instance instance,
SerializedVarReturnValue result);
+ void OnMsgGetPluginInstanceURL(PP_Instance instance,
+ SerializedVarReturnValue result);
DISALLOW_COPY_AND_ASSIGN(PPB_URLUtil_Proxy);
};