-
zhaobin authored
This CL actually turns on 1-UA messaging: - When presentation starts, a new route is created and returned to MR. In PresentationDispatcher, we send controller_connection_proxy and receiver_connection_request back to browser via PresentationService::SetPresentationConnection() For 1-UA: - In PresentationServiceDelegateImpl::ConnectToPresentation(), we register proxy and request as a controller connection entry to OPM. If there has been a receiver_call_back, invoke it; - When offscreen tab is rendered, we register a receiverPSDImpl, which registers a receiver_call_back to OPM. If there is any pending controller connection entry, invoke receiver_call_back for each controller connection entry; - In receiver_call_back (PresentationDispatcher::OnReceiverConnectionAvailable() function), we create a receiver_connection_proxy object, bind it to receiver_connection_request (input parameter) and connect it with controller_connection_proxy (input parameter). Message sending between controller Blink connection and receiver Blink connection may happen afterwards. For 2-UA: - In PresentationServiceDelegateImpl::ConnectToPresentation(), we create a browser_connection_proxy object, bind it to receiver_connection_request (input parameter) and connect it with controller_connection_proxy (input parameter). Message sending from controller Blink connection to media router may happen afterwards. More details in code comments and design doc (use chromium.org account): https://docs.google.com/document/d/1XM3jhMJTQyhEC5PDAAJFNIaKh6UUEihqZDz_ztEe4Co/edit#heading=h.hadpx5oi0gml Patch set 4 updates: - added BrowserPresentationConnectionProxy class - Added PresentationFrame::IsOffscreen() and PresentationFrame::OnBrowserConnectionAvailable() - PresentationConnection::OnMessage() takes a callback - PresentationDispatcher::SendXXX() takes PresentationConnectionProxy as parameter BUG=525660,513859 Review-Url: https://codereview.chromium.org/2471573005 Cr-Original-Commit-Position: refs/heads/master@{#448299} Committed: https://chromium.googlesource.com/chromium/src/+/4b94a1fe3f58aacad2c46bbfd84aa780469e15be Review-Url: https://codereview.chromium.org/2471573005 Cr-Commit-Position: refs/heads/master@{#448509}
42407c7f