diff options
author | ddorwin@chromium.org <ddorwin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-04-18 16:00:47 +0000 |
---|---|---|
committer | ddorwin@chromium.org <ddorwin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-04-18 16:00:47 +0000 |
commit | 2b657fd950ea3e06ac489f37c5d320dde00d70ad (patch) | |
tree | 1dcd64a12edffbcb17bb9d33a04d7517a08d705a /webkit/plugins | |
parent | eaca0ad17b151d28b1e5821f1fce27a6dadc0b29 (diff) | |
download | chromium_src-2b657fd950ea3e06ac489f37c5d320dde00d70ad.zip chromium_src-2b657fd950ea3e06ac489f37c5d320dde00d70ad.tar.gz chromium_src-2b657fd950ea3e06ac489f37c5d320dde00d70ad.tar.bz2 |
Implemented broker dispatcher, pipe creation, and handle distribution.
BUG=none
TEST=none
Review URL: http://codereview.chromium.org/6865045
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@81951 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/plugins')
-rw-r--r-- | webkit/plugins/ppapi/ppb_broker_impl.cc | 8 | ||||
-rw-r--r-- | webkit/plugins/ppapi/ppb_broker_impl.h | 2 |
2 files changed, 6 insertions, 4 deletions
diff --git a/webkit/plugins/ppapi/ppb_broker_impl.cc b/webkit/plugins/ppapi/ppb_broker_impl.cc index 959830a..16aa316 100644 --- a/webkit/plugins/ppapi/ppb_broker_impl.cc +++ b/webkit/plugins/ppapi/ppb_broker_impl.cc @@ -128,8 +128,10 @@ PPB_Broker_Impl* PPB_Broker_Impl::AsPPB_Broker_Impl() { } // Transfers ownership of the handle to the plugin. -void PPB_Broker_Impl::BrokerConnected(int32_t handle) { - DCHECK(handle); +void PPB_Broker_Impl::BrokerConnected(int32_t handle, int32_t result) { + DCHECK(result == PP_OK || + handle == PlatformFileToInt(base::kInvalidPlatformFileValue)); + pipe_handle_ = handle; // Synchronous calls are not supported. @@ -137,7 +139,7 @@ void PPB_Broker_Impl::BrokerConnected(int32_t handle) { scoped_refptr<TrackedCompletionCallback> callback; callback.swap(connect_callback_); - callback->Run(PP_OK); // Will complete abortively if necessary. + callback->Run(result); // Will complete abortively if necessary. } } // namespace ppapi diff --git a/webkit/plugins/ppapi/ppb_broker_impl.h b/webkit/plugins/ppapi/ppb_broker_impl.h index 2e7b0b6..5bba19a 100644 --- a/webkit/plugins/ppapi/ppb_broker_impl.h +++ b/webkit/plugins/ppapi/ppb_broker_impl.h @@ -33,7 +33,7 @@ class PPB_Broker_Impl : public Resource { // Resource override. virtual PPB_Broker_Impl* AsPPB_Broker_Impl(); - virtual void BrokerConnected(int32_t handle); + void BrokerConnected(int32_t handle, int32_t result); private: // PluginDelegate ppapi broker object. |