MediaRenderer: Returns initialization result in the init callback.
commitca5615c36b3a7dc92d5fd7bd2e2cbd6573097fc6
authorxhwang <xhwang@chromium.org>
Mon, 13 Jul 2015 22:59:44 +0000 (13 15:59 -0700)
committerCommit bot <commit-bot@chromium.org>
Mon, 13 Jul 2015 23:01:33 +0000 (13 23:01 +0000)
tree4f13e89ce59cbd7c49a393557e2111cb306bc114
parent7e0b05db062503cb21d27ca7dce857cf68d3f287
MediaRenderer: Returns initialization result in the init callback.

Currently the initialization result is returned in the OnError() call. However,
the init_cb is returned on the MediaRenderer pipe, while OnError() is called on
the client (MediaRendererClient) pipe. The order of these two calls are not
deterministic.

This CL makes sure the initialization result is always returned in the init
callback. This is also more consistent with the media::Renderer interface.

BUG=509801
TEST=All existing tests pass.

Review URL: https://codereview.chromium.org/1232703005

Cr-Commit-Position: refs/heads/master@{#338581}
media/mojo/interfaces/media_renderer.mojom
media/mojo/services/media_apptest.cc
media/mojo/services/mojo_renderer_impl.cc
media/mojo/services/mojo_renderer_impl.h
media/mojo/services/mojo_renderer_service.cc
media/mojo/services/mojo_renderer_service.h