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

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

Issue 8920005: Add TestingInstance::EvalScript method which posts a message that the test page can eval(). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' 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
« ppapi/tests/test_input_event.cc ('K') | « ppapi/tests/test_input_event.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
===================================================================
--- webkit/plugins/ppapi/plugin_module.cc (revision 114053)
+++ webkit/plugins/ppapi/plugin_module.cc (working copy)
@@ -239,13 +239,24 @@
plugin_instance->SimulateInputEvent(input_event_data);
}
+PP_Var ExecuteScript(PP_Instance instance, PP_Var script, PP_Var* exception) {
+ PluginInstance* plugin_instance = host_globals->GetInstance(instance);
+ if (!plugin_instance) {
+ *exception = PP_MakeUndefined();
+ return PP_MakeUndefined();
+ }
+
+ return plugin_instance->ExecuteScript(instance, script, exception);
+}
+
const PPB_Testing_Dev testing_interface = {
&ReadImageData,
&RunMessageLoop,
&QuitMessageLoop,
&GetLiveObjectsForInstance,
&IsOutOfProcess,
- &SimulateInputEvent
+ &SimulateInputEvent,
+ &ExecuteScript
};
// GetInterface ----------------------------------------------------------------
@@ -338,6 +349,7 @@
if (CommandLine::ForCurrentProcess()->HasSwitch(
switches::kEnablePepperTesting)) {
if (strcmp(name, PPB_TESTING_DEV_INTERFACE) == 0 ||
+ strcmp(name, PPB_TESTING_DEV_INTERFACE_0_8) == 0 ||
strcmp(name, PPB_TESTING_DEV_INTERFACE_0_7) == 0) {
return &testing_interface;
}
« ppapi/tests/test_input_event.cc ('K') | « ppapi/tests/test_input_event.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698