Chromium Code Reviews
Description[Presentation API] (1-UA) fire PresentationConnection onterminate event if receiver page gets destroyed
We need to fire 'onterminate' event on controller frame if (Please add scenarios that are missing):
Controller initiates termination:
1. call connection.terminate() in js
2. click 'stop' on MR dialog
(closing controller frame will close but not terminate connection)
1. and 2. are equivalent in the sense that connection.terminate() just calls router->terminateRoute(). Cast MRP will notify state change and fire 'onterminate' event in these cases. (Existing implementation covers this)
Receiver initiates termination:
1. receiver frame gets destroyed, e.g. call window.close() in js
2. call connection.terminate() in js
We can make 1. and 2. equivalent, by having connection.terminate() call window.close(). When offscreen_tab is gone, cast MRP will get notified (mirroring has been stopped) and notify controller about state change.
BUG=588874
Review-Url: https://codereview.chromium.org/2484273003
Cr-Commit-Position: refs/heads/master@{#454497}
Committed: https://chromium.googlesource.com/chromium/src/+/ad129a062423b83cf71bbf1f3e114ea7d8828fab
Patch Set 1 #
Total comments: 2
Patch Set 2 : resolve code review comments from haraken #
Total comments: 14
Patch Set 3 : merge with master #
Total comments: 8
Patch Set 4 : resolve code review comments from Derek #Patch Set 5 : resolve code review comments from Mark #
Total comments: 2
Patch Set 6 : fix unit test errors #Patch Set 7 : rebase #Messages
Total messages: 45 (25 generated)
|