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

Unified Diff: webkit/glue/plugins/plugin_host.cc

Issue 329013: Implemented NPN_ScheduleTimer and NPN_UnscheduleTimer. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 2 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 | « webkit/glue/plugins/nphostapi.h ('k') | webkit/glue/plugins/plugin_instance.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/glue/plugins/plugin_host.cc
===================================================================
--- webkit/glue/plugins/plugin_host.cc (revision 29899)
+++ webkit/glue/plugins/plugin_host.cc (working copy)
@@ -108,6 +108,8 @@
host_funcs_.getvalueforurl = NPN_GetValueForURL;
host_funcs_.setvalueforurl = NPN_SetValueForURL;
host_funcs_.getauthenticationinfo = NPN_GetAuthenticationInfo;
+ host_funcs_.scheduletimer = NPN_ScheduleTimer;
+ host_funcs_.unscheduletimer = NPN_UnscheduleTimer;
}
void PluginHost::PatchNPNetscapeFuncs(NPNetscapeFuncs* overrides) {
@@ -1090,4 +1092,20 @@
return NPERR_GENERIC_ERROR;
}
+uint32 NPN_ScheduleTimer(NPP id,
+ uint32 interval,
+ NPBool repeat,
+ void (*func)(NPP id, uint32 timer_id)) {
+ scoped_refptr<NPAPI::PluginInstance> plugin = FindInstance(id);
+ if (!plugin)
+ return 0;
+
+ return plugin->ScheduleTimer(interval, repeat, func);
+}
+
+void NPN_UnscheduleTimer(NPP id, uint32 timer_id) {
+ scoped_refptr<NPAPI::PluginInstance> plugin = FindInstance(id);
+ if (plugin)
+ plugin->UnscheduleTimer(timer_id);
+}
} // extern "C"
« no previous file with comments | « webkit/glue/plugins/nphostapi.h ('k') | webkit/glue/plugins/plugin_instance.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698