Index: content/renderer/pepper/renderer_ppapi_host_impl.cc |
diff --git a/content/renderer/pepper/renderer_ppapi_host_impl.cc b/content/renderer/pepper/renderer_ppapi_host_impl.cc |
index 4971d5188e525aa2dd7c23802783ac114eaf26b9..307bd7200bddf86f326acecc1595611cab8328cb 100644 |
--- a/content/renderer/pepper/renderer_ppapi_host_impl.cc |
+++ b/content/renderer/pepper/renderer_ppapi_host_impl.cc |
@@ -17,6 +17,9 @@ |
#include "ppapi/host/ppapi_host.h" |
#include "ppapi/proxy/host_dispatcher.h" |
#include "third_party/WebKit/Source/Platform/chromium/public/WebRect.h" |
+#include "third_party/WebKit/Source/WebKit/chromium/public/WebDocument.h" |
+#include "third_party/WebKit/Source/WebKit/chromium/public/WebElement.h" |
+#include "third_party/WebKit/Source/WebKit/chromium/public/WebPluginContainer.h" |
#include "ui/gfx/point.h" |
#include "webkit/plugins/ppapi/fullscreen_container.h" |
#include "webkit/plugins/ppapi/host_globals.h" |
@@ -243,6 +246,15 @@ gfx::Point RendererPpapiHostImpl::PluginPointToRenderView( |
pt.y() + plugin_instance->view_data().rect.point.y); |
} |
+GURL RendererPpapiHostImpl::GetDocumentURLForInstance( |
+ PP_Instance instance) const { |
+ webkit::ppapi::PluginInstance* plugin_instance = |
+ GetAndValidateInstance(instance); |
+ if (!plugin_instance) |
+ return GURL(); |
+ return plugin_instance->container()->element().document().url(); |
+} |
+ |
IPC::PlatformFileForTransit RendererPpapiHostImpl::ShareHandleWithRemote( |
base::PlatformFile handle, |
bool should_close_source) { |