Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(484)

Unified Diff: content/browser/presentation/presentation_service_impl.cc

Issue 2484273003: [Presentation API] (1-UA) fire PresentationConnection onterminate event if receiver page gets destr… (Closed)
Patch Set: resolve code review comments from haraken Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: content/browser/presentation/presentation_service_impl.cc
diff --git a/content/browser/presentation/presentation_service_impl.cc b/content/browser/presentation/presentation_service_impl.cc
index 8c3bdab4e699585fcb73132dc6746bfb77ef09c2..77e2fd7c3cc170abf0fe322505a53a6ec9df5f03 100644
--- a/content/browser/presentation/presentation_service_impl.cc
+++ b/content/browser/presentation/presentation_service_impl.cc
@@ -577,6 +577,13 @@ void PresentationServiceImpl::Reset() {
if (auto delegate = GetPresentationServiceDelegate())
delegate->Reset(render_process_id_, render_frame_id_);
+ if (receiver_delegate_) {
imcheng 2016/11/28 22:12:00 If the receiver frame is already being destroyed t
zhaobin 2017/02/16 00:42:30 This function is called before destroying Presenta
imcheng 2017/02/24 19:20:33 I see. Note that Reset() also gets called on navig
imcheng 2017/02/24 19:20:33 It feels like we should be able to observe for thi
zhaobin 2017/02/25 01:31:03 Move state change to PresentationDispatcher. Cont
mark a. foltz 2017/02/25 01:43:12 The offscreen tab should be closed if it attempts
+ PresentationSessionInfo dummy_session(GURL("fake_url"), "fake_id", true);
+ OnConnectionStateChanged(dummy_session,
+ PresentationConnectionStateChangeInfo(
+ PRESENTATION_CONNECTION_STATE_TERMINATED));
+ }
+
default_presentation_urls_.clear();
screen_availability_listeners_.clear();

Powered by Google App Engine
This is Rietveld 408576698