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

Unified Diff: remoting/host/plugin/host_plugin.cc

Issue 9427023: Add functions to expand PostDelayedTask interface. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Add fix to RunOnPluginThread() in host_plugin.cc Created 8 years, 10 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 | « remoting/client/plugin/pepper_plugin_thread_delegate.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/host/plugin/host_plugin.cc
diff --git a/remoting/host/plugin/host_plugin.cc b/remoting/host/plugin/host_plugin.cc
index f001afbe428872f314ce7ec2173419fc9db74c45..69340d055552f430b7ed4889922c1274b73288da 100644
--- a/remoting/host/plugin/host_plugin.cc
+++ b/remoting/host/plugin/host_plugin.cc
@@ -148,13 +148,13 @@ class HostNPPlugin : public remoting::PluginMessageLoopProxy::Delegate {
// PluginMessageLoopProxy::Delegate implementation.
virtual bool RunOnPluginThread(
- int delay_ms, void(function)(void*), void* data) OVERRIDE {
- if (delay_ms == 0) {
+ base::TimeDelta delay, void(function)(void*), void* data) OVERRIDE {
+ if (delay == base::TimeDelta()) {
g_npnetscape_funcs->pluginthreadasynccall(instance_, function, data);
} else {
base::AutoLock auto_lock(timers_lock_);
uint32_t timer_id = g_npnetscape_funcs->scheduletimer(
- instance_, delay_ms, false, &NPDelayedTaskSpringboard);
+ instance_, delay.InMilliseconds(), false, &NPDelayedTaskSpringboard);
DelayedTask task = {function, data};
timers_[timer_id] = task;
}
« no previous file with comments | « remoting/client/plugin/pepper_plugin_thread_delegate.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698