Initially when the design was to do this experiment in browser, which doesn't have webrtc code, it requires some glue code to bridge the difference between what's available in webrtc::base and browser process. Now since we're moving to renderer process, we could reuse a lot of existing interfaces instead of rolling our own.

BUG=webrtc:4576
R=pthatcher@webrtc.org

Review URL: https://codereview.webrtc.org/1173353002.

Cr-Commit-Position: refs/heads/master@{#9466}
diff --git a/webrtc/base/asyncinvoker.cc b/webrtc/base/asyncinvoker.cc
index 35ce2fb..56f1a19 100644
--- a/webrtc/base/asyncinvoker.cc
+++ b/webrtc/base/asyncinvoker.cc
@@ -64,6 +64,18 @@
   thread->Post(this, id, new ScopedRefMessageData<AsyncClosure>(closure));
 }
 
+void AsyncInvoker::DoInvokeDelayed(Thread* thread,
+                                   const scoped_refptr<AsyncClosure>& closure,
+                                   uint32 delay_ms,
+                                   uint32 id) {
+  if (destroying_) {
+    LOG(LS_WARNING) << "Tried to invoke while destroying the invoker.";
+    return;
+  }
+  thread->PostDelayed(delay_ms, this, id,
+                      new ScopedRefMessageData<AsyncClosure>(closure));
+}
+
 NotifyingAsyncClosureBase::NotifyingAsyncClosureBase(AsyncInvoker* invoker,
                                                      Thread* calling_thread)
     : invoker_(invoker), calling_thread_(calling_thread) {