[Presentation API] Delete StartSession queueing logic.
commitacfb453f172270678daebebe3264446f1cabd8b5
authorimcheng <imcheng@google.com>
Fri, 19 Jun 2015 16:32:13 +0000 (19 09:32 -0700)
committerCommit bot <commit-bot@chromium.org>
Fri, 19 Jun 2015 16:32:53 +0000 (19 16:32 +0000)
treefa8ac8202387fd19bbf9ec311e35ad4673d473dd
parent6bef27e9bb046778a13b5cd7025208218c098e80
[Presentation API] Delete StartSession queueing logic.

Per the API spec, the browser may choose to reject an incoming
StartSession request if there is already one in progress, due to the
call opening a dialog modal to the tab. This patch removes the incorrect
queueing logic that is currently in PresentationServiceImpl. It changes
StartSession so that is if there is a pending StartSession callback,
subsequent StartSession requests will be immediately rejected.

Note that PresentationServiceDelegateImpl will also invoke the error
callback immediately if the dialog controller cannot create a new
dialog for StartSession (because there is already one open).

BUG=501439

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

Cr-Commit-Position: refs/heads/master@{#335269}
content/browser/presentation/presentation_service_impl.cc
content/browser/presentation/presentation_service_impl.h
content/browser/presentation/presentation_service_impl_unittest.cc