Index: webkit/plugins/ppapi/ppb_broker_impl.cc |
diff --git a/webkit/plugins/ppapi/ppb_broker_impl.cc b/webkit/plugins/ppapi/ppb_broker_impl.cc |
index 289b17316c1ba4f1ecbc0fa36297003ce9d186a9..2386e0dcec87288038dee8e875911a8fdb7074db 100644 |
--- a/webkit/plugins/ppapi/ppb_broker_impl.cc |
+++ b/webkit/plugins/ppapi/ppb_broker_impl.cc |
@@ -40,12 +40,8 @@ PPB_Broker_API* PPB_Broker_Impl::AsPPB_Broker_API() { |
return this; |
} |
-int32_t PPB_Broker_Impl::Connect(PP_CompletionCallback connect_callback) { |
- if (!connect_callback.func) { |
- // Synchronous calls are not supported. |
- return PP_ERROR_BLOCKS_MAIN_THREAD; |
- } |
- |
+int32_t PPB_Broker_Impl::Connect( |
+ scoped_refptr<TrackedCallback> connect_callback) { |
// TODO(ddorwin): Return PP_ERROR_FAILED if plugin is in-process. |
if (broker_) { |
@@ -61,7 +57,7 @@ int32_t PPB_Broker_Impl::Connect(PP_CompletionCallback connect_callback) { |
// and BrokerConnected is called before ConnectToBroker returns. |
// Because it must be created now, it must be aborted and cleared if |
// ConnectToBroker fails. |
- connect_callback_ = new TrackedCallback(this, connect_callback); |
+ connect_callback_ = connect_callback; |
broker_ = plugin_instance->delegate()->ConnectToBroker(this); |
if (!broker_) { |