[Presentation API] Fix stability issues with PresentationService.
commit16819b9d695c4bb204ff5d28db1e43787e8d9d35
authorimcheng <imcheng@google.com>
Fri, 3 Apr 2015 08:52:45 +0000 (3 01:52 -0700)
committerCommit bot <commit-bot@chromium.org>
Fri, 3 Apr 2015 08:53:10 +0000 (3 08:53 +0000)
treef3d92996eceb188935f6e6bc744b6f934e14c867
parentd954d8569157dbbf5a72fe90f935d802369ce52b
[Presentation API] Fix stability issues with PresentationService.

- Temporarily comment out the ListenForDefaultSessionStart and
  ListenForSessionStateChange invoked by PresentationDispatcher right
  after connecting to PresentationServiceImpl. These calls contain
  callbacks which are dropped by PSImpl since they are not implemented,
  which leads to connection error.
- Switch to use mojo::Binding in PSImpl. PSImpl is destroyed when a
  connection error occurs. Also since the frame can be destroyed
  before connection error, make sure we stop referencing the RFH after
  RenderFrameDeleted().

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

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