PPAPI: Make blocking completion callbacks work.

This also makes scoped_refptr<TrackedCallback> the "new" way to pass completion callbacks in an API. This allows the Enter object to handle checking for blocking callbacks on the main thread to report error, and blocking if on the background thread. This way, interfaces don't have to write any special cases for blocking callbacks.

When built with enable_pepper_threading=1 locally, URLLoader tests all pass for blocking completion callbacks. I haven't updated all tests yet.

BUG=92909
TEST=


Review URL: https://chromiumcodereview.appspot.com/10081020

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@143806 0039d316-1c4b-4281-b951-d872f2087c98
diff --git a/ppapi/proxy/plugin_dispatcher.cc b/ppapi/proxy/plugin_dispatcher.cc
index ad8c620..9cf606e2 100644
--- a/ppapi/proxy/plugin_dispatcher.cc
+++ b/ppapi/proxy/plugin_dispatcher.cc
@@ -45,17 +45,13 @@
 }  // namespace
 
 InstanceData::InstanceData()
-    : flash_fullscreen(PP_FALSE),
-      mouse_lock_callback(PP_BlockUntilComplete()) {
+    : flash_fullscreen(PP_FALSE) {
 }
 
 InstanceData::~InstanceData() {
   // Run any pending mouse lock callback to prevent leaks.
-  if (mouse_lock_callback.func) {
-    CallWhileUnlocked(PP_RunAndClearCompletionCallback,
-                      &mouse_lock_callback,
-                      static_cast<int32_t>(PP_ERROR_ABORTED));
-  }
+  if (mouse_lock_callback)
+    mouse_lock_callback->Abort();
 }
 
 PluginDispatcher::PluginDispatcher(PP_GetInterface_Func get_interface,