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

Issue 2942993003: [cast_channel] Make CastMessageHandler a CastSocket::Observer instead of CastTransport::Delegate (Closed)

Created:
3 years, 6 months ago by zhaobin
Modified:
3 years, 6 months ago
Reviewers:
mark a. foltz, imcheng
CC:
chromium-apps-reviews_chromium.org, chromium-reviews, extensions-reviews_chromium.org, mfoltz+watch_chromium.org
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

[cast_channel] Make CastMessageHandler a CastSocket::Observer instead of CastTransport::Delegate We are going to create one CastSocket for one IP endpoint and share it between browser and different extensions. To handle message and errors, it seems more reasonable to have one CastTransport::Delegate and multiple observers per CastSocket. BUG=687377 Review-Url: https://codereview.chromium.org/2942993003 Cr-Commit-Position: refs/heads/master@{#481334} Committed: https://chromium.googlesource.com/chromium/src/+/487f46f96fbed1f58c8dc3fb2d940dd5f36ca7b3

Patch Set 1 #

Total comments: 10

Patch Set 2 : resolve code review comments from Derek and Mark #

Total comments: 12

Patch Set 3 : resolve code review comments from Mark #

Total comments: 6

Patch Set 4 : resolve code review comments from Derek #

Unified diffs Side-by-side diffs Delta from patch set Stats (+216 lines, -122 lines) Patch
M components/cast_channel/cast_socket.h View 1 2 3 9 chunks +41 lines, -6 lines 0 comments Download
M components/cast_channel/cast_socket.cc View 1 2 3 5 chunks +35 lines, -7 lines 0 comments Download
M components/cast_channel/cast_socket_service.h View 1 2 2 chunks +15 lines, -0 lines 0 comments Download
M components/cast_channel/cast_socket_service.cc View 1 2 3 1 chunk +13 lines, -0 lines 0 comments Download
M components/cast_channel/cast_socket_unittest.cc View 1 19 chunks +45 lines, -39 lines 0 comments Download
M components/cast_channel/cast_test_util.h View 1 3 chunks +13 lines, -15 lines 0 comments Download
M components/cast_channel/cast_test_util.cc View 1 chunk +3 lines, -0 lines 0 comments Download
M extensions/browser/api/cast_channel/cast_channel_api.h View 1 chunk +7 lines, -9 lines 0 comments Download
M extensions/browser/api/cast_channel/cast_channel_api.cc View 1 2 5 chunks +17 lines, -16 lines 0 comments Download
M extensions/browser/api/cast_channel/cast_channel_apitest.cc View 1 9 chunks +27 lines, -30 lines 0 comments Download

Depends on Patchset:

Dependent Patchsets:

Messages

Total messages: 27 (16 generated)
zhaobin
3 years, 6 months ago (2017-06-16 18:14:32 UTC) #2
mark a. foltz
Looks good overall - one design question https://codereview.chromium.org/2942993003/diff/1/components/cast_channel/cast_socket.h File components/cast_channel/cast_socket.h (right): https://codereview.chromium.org/2942993003/diff/1/components/cast_channel/cast_socket.h#newcode422 components/cast_channel/cast_socket.h:422: std::map<std::string, std::unique_ptr<Observer>> ...
3 years, 6 months ago (2017-06-16 23:26:15 UTC) #3
imcheng
My comments are mainly geared towards making CastSocket shared across profiles in the future. Feel ...
3 years, 6 months ago (2017-06-16 23:39:25 UTC) #4
zhaobin
https://codereview.chromium.org/2942993003/diff/1/components/cast_channel/cast_socket.h File components/cast_channel/cast_socket.h (right): https://codereview.chromium.org/2942993003/diff/1/components/cast_channel/cast_socket.h#newcode128 components/cast_channel/cast_socket.h:128: virtual bool HasObserver(const std::string& id) = 0; On 2017/06/16 ...
3 years, 6 months ago (2017-06-20 00:54:36 UTC) #6
mark a. foltz
lgtm I'm not sure there will ever be more than one extension id creating cast ...
3 years, 6 months ago (2017-06-20 01:16:44 UTC) #7
zhaobin
We use socket observer map in CastMediaSinkService (https://codereview.chromium.org/2927833002/) as well, so keep it for now ...
3 years, 6 months ago (2017-06-20 17:50:06 UTC) #10
imcheng
As discussed in person, the relationship between CastSocket, CastSocketService and Observers will have to be ...
3 years, 6 months ago (2017-06-21 01:22:52 UTC) #15
imcheng
lgtm
3 years, 6 months ago (2017-06-21 01:22:58 UTC) #16
zhaobin
https://codereview.chromium.org/2942993003/diff/60001/components/cast_channel/cast_socket.h File components/cast_channel/cast_socket.h (right): https://codereview.chromium.org/2942993003/diff/60001/components/cast_channel/cast_socket.h#newcode65 components/cast_channel/cast_socket.h:65: cast_channel::ChannelError error_state) = 0; On 2017/06/21 01:22:52, imcheng wrote: ...
3 years, 6 months ago (2017-06-21 17:48:13 UTC) #17
commit-bot: I haz the power
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2942993003/80001
3 years, 6 months ago (2017-06-21 22:31:15 UTC) #24
commit-bot: I haz the power
3 years, 6 months ago (2017-06-21 22:35:41 UTC) #27
Message was sent while issue was closed.
Committed patchset #4 (id:80001) as
https://chromium.googlesource.com/chromium/src/+/487f46f96fbed1f58c8dc3fb2d94...

Powered by Google App Engine
This is Rietveld 408576698