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

Issue 1430413003: [Media Router] Connection state change listening redesign part 2. (Closed)

Created:
5 years, 1 month ago by imcheng
Modified:
5 years, 1 month ago
Reviewers:
mark a. foltz
CC:
Aaron Boodman, abarth-chromium, whywhat, ben+mojo_chromium.org, chromium-reviews, darin (slow to review), darin-cc_chromium.org, feature-media-reviews_chromium.org, jam, mcasas+watch_chromium.org, media-router+watch_chromium.org, mkwst+moarreviews-renderer_chromium.org, mlamouri+watch-content_chromium.org, posciak+watch_chromium.org, qsr+mojo_chromium.org, viettrungluu+watch_chromium.org, yzshen+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

[Media Router] Connection state change listening redesign part 2. - PresentationDispatcher no longer calls ListenForSessionStateChange on PresentationService startup. - When a PresentationConnection is successfully created, PSImpl will call back to PSDImpl to start listening for state changes for that connection. This required adding a PresentationSessionInfo (to be renamed soon) param to the PSD's ListenForConnectionStateChange API. - PSDImpl no longer uses PresentationSessionStateObserver. Instead it uses PresentationConnectionStateObserver, which listens on a per-connection basis and doesn't use a MediaRoutesObserver. Note that this change is not backwards compatible. It is expected this will break state change for users with older MR extensions. It will also break Android since state change isn't implemented there yet. Given that the PresentationConnection states spec is still in progress, it's probably not an unreasonable thing to do. Also did some best-effort renaming. (Renaming patch soon) BUG=529893 Committed: https://crrev.com/f3e5a01a75bbdd97e5d218c4fb5154de28745a4e Cr-Commit-Position: refs/heads/master@{#360740}

Patch Set 1 #

Patch Set 2 : added tests #

Patch Set 3 : Fixed tests #

Patch Set 4 : Rebase #

Patch Set 5 : Fix compile #

Total comments: 12

Patch Set 6 : Addressed comments #8 #

Patch Set 7 : fix compile #

Patch Set 8 : Rebase #

Patch Set 9 : fix content_unittests compile #

Total comments: 10

Patch Set 10 : Addressed comments #

Patch Set 11 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+422 lines, -681 lines) Patch
M chrome/browser/media/android/router/media_router_android.h View 1 2 3 4 5 6 7 3 chunks +2 lines, -6 lines 0 comments Download
M chrome/browser/media/android/router/media_router_android.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +0 lines, -10 lines 0 comments Download
M chrome/browser/media/router/media_route.h View 1 1 chunk +0 lines, -22 lines 0 comments Download
M chrome/browser/media/router/media_route.cc View 1 1 chunk +0 lines, -30 lines 0 comments Download
M chrome/browser/media/router/media_router.h View 1 2 3 4 5 6 7 8 9 4 chunks +17 lines, -9 lines 0 comments Download
M chrome/browser/media/router/media_router.gypi View 1 2 3 4 5 3 chunks +2 lines, -4 lines 0 comments Download
A chrome/browser/media/router/media_router_base.h View 1 2 3 4 5 6 7 8 9 1 chunk +56 lines, -0 lines 0 comments Download
A chrome/browser/media/router/media_router_base.cc View 1 2 3 4 5 1 chunk +51 lines, -0 lines 0 comments Download
M chrome/browser/media/router/media_router_mojo_impl.h View 1 2 3 4 5 6 7 5 chunks +2 lines, -16 lines 0 comments Download
M chrome/browser/media/router/media_router_mojo_impl.cc View 1 2 3 4 5 6 7 3 chunks +2 lines, -43 lines 0 comments Download
M chrome/browser/media/router/media_router_mojo_impl_unittest.cc View 1 2 3 4 5 6 7 8 9 1 chunk +31 lines, -7 lines 0 comments Download
M chrome/browser/media/router/mock_media_router.h View 1 2 3 4 5 6 7 2 chunks +16 lines, -4 lines 0 comments Download
M chrome/browser/media/router/presentation_connection_state_observer.h View 1 2 3 4 5 6 1 chunk +0 lines, -40 lines 0 comments Download
M chrome/browser/media/router/presentation_connection_state_observer.cc View 1 2 3 4 5 6 1 chunk +0 lines, -24 lines 0 comments Download
M chrome/browser/media/router/presentation_service_delegate_impl.h View 1 1 chunk +4 lines, -2 lines 0 comments Download
M chrome/browser/media/router/presentation_service_delegate_impl.cc View 1 2 3 4 5 6 7 8 9 12 chunks +52 lines, -54 lines 0 comments Download
M chrome/browser/media/router/presentation_service_delegate_impl_unittest.cc View 1 2 3 4 5 6 3 chunks +53 lines, -1 line 0 comments Download
D chrome/browser/media/router/presentation_session_state_observer.h View 1 chunk +0 lines, -85 lines 0 comments Download
D chrome/browser/media/router/presentation_session_state_observer.cc View 1 chunk +0 lines, -66 lines 0 comments Download
D chrome/browser/media/router/presentation_session_state_observer_unittest.cc View 1 chunk +0 lines, -132 lines 0 comments Download
M chrome/browser/media/router/test_helper.h View 1 2 3 4 5 6 3 chunks +7 lines, -12 lines 0 comments Download
M chrome/browser/media/router/test_helper.cc View 1 2 3 4 5 1 chunk +4 lines, -6 lines 0 comments Download
M chrome/chrome_tests_unit.gypi View 1 2 3 4 5 6 7 1 chunk +0 lines, -1 line 0 comments Download
M content/browser/presentation/presentation_service_impl.h View 1 2 3 4 5 6 7 5 chunks +12 lines, -9 lines 0 comments Download
M content/browser/presentation/presentation_service_impl.cc View 1 2 3 4 5 4 chunks +46 lines, -40 lines 0 comments Download
M content/browser/presentation/presentation_service_impl_unittest.cc View 1 2 3 4 5 6 7 8 7 chunks +42 lines, -30 lines 0 comments Download
M content/common/presentation/presentation_service.mojom View 1 2 chunks +4 lines, -9 lines 0 comments Download
M content/public/browser/presentation_service_delegate.h View 1 2 3 4 5 2 chunks +10 lines, -8 lines 0 comments Download
M content/renderer/presentation/presentation_dispatcher.h View 1 2 3 4 5 6 7 1 chunk +3 lines, -3 lines 0 comments Download
M content/renderer/presentation/presentation_dispatcher.cc View 1 2 3 4 5 6 7 2 chunks +6 lines, -8 lines 0 comments Download

Messages

Total messages: 16 (6 generated)
imcheng
Mark: PTAL. I will look into adding some integration tests in this patch or in ...
5 years, 1 month ago (2015-11-11 01:06:35 UTC) #3
mark a. foltz
Looking now. Since Android is launching 100% with M48 this may not be the best ...
5 years, 1 month ago (2015-11-12 03:44:37 UTC) #4
whywhat
Does Android need to implement something special for state change? I thought that state change ...
5 years, 1 month ago (2015-11-12 03:50:26 UTC) #6
mark a. foltz
I don't think this will affect Android. Presentation state observers are not implemented in the ...
5 years, 1 month ago (2015-11-12 04:19:38 UTC) #8
imcheng
PTAL. I changed the API to take the callback as you suggested, and refactored some ...
5 years, 1 month ago (2015-11-16 23:52:01 UTC) #9
mark a. foltz
LGTM % comments Also, please document ownership of the callbacks in MediaRouterBase (i.e. that they ...
5 years, 1 month ago (2015-11-18 00:39:39 UTC) #10
imcheng
https://codereview.chromium.org/1430413003/diff/160001/chrome/browser/media/router/media_router_mojo_impl_unittest.cc File chrome/browser/media/router/media_router_mojo_impl_unittest.cc (right): https://codereview.chromium.org/1430413003/diff/160001/chrome/browser/media/router/media_router_mojo_impl_unittest.cc#newcode785 chrome/browser/media/router/media_router_mojo_impl_unittest.cc:785: ProcessEventLoop(); On 2015/11/18 00:39:38, mark a. foltz wrote: > ...
5 years, 1 month ago (2015-11-19 23:39:53 UTC) #11
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1430413003/200001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1430413003/200001
5 years, 1 month ago (2015-11-20 01:56:53 UTC) #14
commit-bot: I haz the power
Committed patchset #11 (id:200001)
5 years, 1 month ago (2015-11-20 04:08:45 UTC) #15
commit-bot: I haz the power
5 years, 1 month ago (2015-11-20 04:09:45 UTC) #16
Message was sent while issue was closed.
Patchset 11 (id:??) landed as
https://crrev.com/f3e5a01a75bbdd97e5d218c4fb5154de28745a4e
Cr-Commit-Position: refs/heads/master@{#360740}

Powered by Google App Engine
This is Rietveld 408576698