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

Unified Diff: webkit/plugins/ppapi/plugin_module.cc

Issue 8840007: GetDocumentURL is added to PPB_Testing_Dev. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Fixed codereview issues. Created 9 years 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/tests/test_utils.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/plugins/ppapi/plugin_module.cc
diff --git a/webkit/plugins/ppapi/plugin_module.cc b/webkit/plugins/ppapi/plugin_module.cc
index d86c222e3dfeac5f6c6a9bddb9be1c1466929460..615481778e854c739b83df700cf0866a2ac0a1ad 100644
--- a/webkit/plugins/ppapi/plugin_module.cc
+++ b/webkit/plugins/ppapi/plugin_module.cc
@@ -239,13 +239,21 @@ void SimulateInputEvent(PP_Instance instance, PP_Resource input_event) {
plugin_instance->SimulateInputEvent(input_event_data);
}
+PP_Var GetDocumentURL(PP_Instance instance, PP_URLComponents_Dev* components) {
+ PluginInstance* plugin_instance = host_globals->GetInstance(instance);
+ if (!plugin_instance)
+ return PP_MakeUndefined();
+ return plugin_instance->GetDocumentURL(instance, components);
+}
+
const PPB_Testing_Dev testing_interface = {
&ReadImageData,
&RunMessageLoop,
&QuitMessageLoop,
&GetLiveObjectsForInstance,
&IsOutOfProcess,
- &SimulateInputEvent
+ &SimulateInputEvent,
+ &GetDocumentURL
};
// GetInterface ----------------------------------------------------------------
@@ -340,7 +348,8 @@ const void* GetInterface(const char* name) {
if (CommandLine::ForCurrentProcess()->HasSwitch(
switches::kEnablePepperTesting)) {
if (strcmp(name, PPB_TESTING_DEV_INTERFACE) == 0 ||
- strcmp(name, PPB_TESTING_DEV_INTERFACE_0_7) == 0) {
+ strcmp(name, PPB_TESTING_DEV_INTERFACE_0_7) == 0 ||
+ strcmp(name, PPB_TESTING_DEV_INTERFACE_0_8) == 0) {
return &testing_interface;
}
}
« no previous file with comments | « ppapi/tests/test_utils.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698