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

Issue 2706463002: [Presentation API] Mojo typemap for content::PresentationConnectionMessage (Closed)

Created:
3 years, 10 months ago by mark a. foltz
Modified:
3 years, 9 months ago
CC:
Aaron Boodman, abarth-chromium, blink-reviews, blink-reviews-api_chromium.org, chromium-reviews, darin (slow to review), darin-cc_chromium.org, dglazkov+blink, jam, mlamouri+watch-content_chromium.org, qsr+mojo_chromium.org, viettrungluu+watch_chromium.org, yzshen+watch_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Converts presentation.mojom to use a typemap for content::PresentationConnectionMessage. This triggered a number of knock-on refactorings: 1. PresentationConnectionMessage is now a move-only type to enforce no extraneous copies as it is passed in the browser. 2. presentation_constants.h is folded into presentation_connection_message.h as it defines a constant only for PCM. 3. The mojo message is now a union and the type field in PCM is removed. It can be derived from which Optional field is set. 4. Tests are refactored to remove needless proxy/trampoline methods. There are still more tangentially related cleanups to do: - RouteMessage is not necessary and can be replaced with PCM. - Unit tests use message loops in needlessly complicated ways. - The message size limit needs to be more flexible and enforced downstream as Cast and non-Cast sinks have different limits. BUG=632623 Review-Url: https://codereview.chromium.org/2706463002 Cr-Commit-Position: refs/heads/master@{#455143} Committed: https://chromium.googlesource.com/chromium/src/+/0dc2a6bdf85013def2fcbb1b157eee49b63a1d5a

Patch Set 1 #

Patch Set 2 : Finished API changes, working on unittests #

Patch Set 3 : Fix typos #

Patch Set 4 : Finish updating all APIS. #

Patch Set 5 : Rebase #

Patch Set 6 : Fix compile error in presentation_connection_message #

Total comments: 21

Patch Set 7 : Address comments #

Patch Set 8 : Rebase #

Patch Set 9 : Remove TODO #

Total comments: 21

Patch Set 10 : Respond to dcheng@ comments #

Total comments: 5

Patch Set 11 : Revert Media Router changes #

Patch Set 12 : Fix calls to SendRouteBinaryMessage #

Patch Set 13 : Rebase on clean branch #

Patch Set 14 : Rebase again #

Patch Set 15 : Fix compile error after rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+369 lines, -520 lines) Patch
M chrome/browser/media/router/browser_presentation_connection_proxy.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +2 lines, -1 line 0 comments Download
M chrome/browser/media/router/browser_presentation_connection_proxy.cc View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +11 lines, -56 lines 0 comments Download
M chrome/browser/media/router/browser_presentation_connection_proxy_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 4 chunks +16 lines, -20 lines 0 comments Download
M chrome/browser/media/router/presentation_service_delegate_impl.h View 1 2 3 4 5 6 7 8 9 1 chunk +5 lines, -6 lines 0 comments Download
M chrome/browser/media/router/presentation_service_delegate_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 3 chunks +16 lines, -19 lines 0 comments Download
M chrome/browser/media/router/route_message.h View 1 2 3 1 chunk +2 lines, -0 lines 0 comments Download
M content/browser/presentation/presentation_service_impl.h View 1 2 3 4 5 6 7 8 9 2 chunks +2 lines, -4 lines 0 comments Download
M content/browser/presentation/presentation_service_impl.cc View 1 2 3 4 5 6 7 8 9 3 chunks +2 lines, -44 lines 0 comments Download
M content/browser/presentation/presentation_service_impl_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 17 chunks +73 lines, -144 lines 0 comments Download
M content/common/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +2 lines, -0 lines 0 comments Download
M content/common/presentation/presentation.typemap View 1 2 3 4 5 6 7 8 9 1 chunk +8 lines, -4 lines 0 comments Download
M content/common/presentation/presentation_struct_traits.h View 1 2 3 4 5 6 7 8 9 3 chunks +28 lines, -26 lines 0 comments Download
A content/common/presentation/presentation_struct_traits.cc View 1 2 3 4 5 6 7 8 9 1 chunk +64 lines, -0 lines 0 comments Download
M content/public/browser/presentation_service_delegate.h View 1 2 3 4 5 6 7 8 9 2 chunks +8 lines, -12 lines 0 comments Download
M content/public/common/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +0 lines, -2 lines 0 comments Download
M content/public/common/presentation_connection_message.h View 1 2 3 4 5 6 7 8 9 1 chunk +22 lines, -12 lines 0 comments Download
M content/public/common/presentation_connection_message.cc View 1 2 3 4 5 6 1 chunk +26 lines, -3 lines 0 comments Download
D content/public/common/presentation_constants.h View 1 chunk +0 lines, -19 lines 0 comments Download
D content/public/common/presentation_constants.cc View 1 chunk +0 lines, -11 lines 0 comments Download
M content/renderer/presentation/presentation_connection_proxy.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +4 lines, -4 lines 0 comments Download
M content/renderer/presentation/presentation_connection_proxy.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +9 lines, -21 lines 0 comments Download
M content/renderer/presentation/presentation_connection_proxy_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 3 chunks +2 lines, -12 lines 0 comments Download
M content/renderer/presentation/presentation_dispatcher.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 4 chunks +6 lines, -6 lines 0 comments Download
M content/renderer/presentation/presentation_dispatcher.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 8 chunks +27 lines, -52 lines 0 comments Download
M content/renderer/presentation/presentation_dispatcher_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 6 chunks +29 lines, -26 lines 0 comments Download
M third_party/WebKit/public/platform/modules/presentation/presentation.mojom View 1 2 3 4 5 6 7 8 9 10 11 12 13 4 chunks +5 lines, -16 lines 0 comments Download

Messages

Total messages: 56 (39 generated)
mark a. foltz
PTAL imcheng@: Everything hubbe@: chrome/browser/media/cast_* dcheng@: mojom changes avi@: content/public
3 years, 10 months ago (2017-02-24 01:19:20 UTC) #11
Avi (use Gerrit)
lgtm https://codereview.chromium.org/2706463002/diff/100001/content/public/browser/presentation_service_delegate.h File content/public/browser/presentation_service_delegate.h (right): https://codereview.chromium.org/2706463002/diff/100001/content/public/browser/presentation_service_delegate.h#newcode30 content/public/browser/presentation_service_delegate.h:30: // Param #0: a vector of messages that ...
3 years, 10 months ago (2017-02-24 04:08:51 UTC) #13
imcheng
lgtm, a few comments https://codereview.chromium.org/2706463002/diff/100001/chrome/browser/media/cast_remoting_connector_unittest.cc File chrome/browser/media/cast_remoting_connector_unittest.cc (right): https://codereview.chromium.org/2706463002/diff/100001/chrome/browser/media/cast_remoting_connector_unittest.cc#newcode185 chrome/browser/media/cast_remoting_connector_unittest.cc:185: message.binary = std::move(data); Since data ...
3 years, 9 months ago (2017-02-25 01:08:41 UTC) #14
dcheng
https://codereview.chromium.org/2706463002/diff/100001/chrome/browser/media/cast_remoting_connector_unittest.cc File chrome/browser/media/cast_remoting_connector_unittest.cc (right): https://codereview.chromium.org/2706463002/diff/100001/chrome/browser/media/cast_remoting_connector_unittest.cc#newcode185 chrome/browser/media/cast_remoting_connector_unittest.cc:185: message.binary = std::move(data); On 2017/02/25 01:08:40, imcheng wrote: > ...
3 years, 9 months ago (2017-02-25 07:17:27 UTC) #15
mark a. foltz
PTAL https://codereview.chromium.org/2706463002/diff/100001/chrome/browser/media/cast_remoting_connector_unittest.cc File chrome/browser/media/cast_remoting_connector_unittest.cc (right): https://codereview.chromium.org/2706463002/diff/100001/chrome/browser/media/cast_remoting_connector_unittest.cc#newcode185 chrome/browser/media/cast_remoting_connector_unittest.cc:185: message.binary = std::move(data); On 2017/02/25 at 07:17:27, dcheng ...
3 years, 9 months ago (2017-02-27 23:25:15 UTC) #21
dcheng
+yzshen for mojo utf8 string question https://codereview.chromium.org/2706463002/diff/160001/chrome/browser/media/android/router/media_router_android.cc File chrome/browser/media/android/router/media_router_android.cc (right): https://codereview.chromium.org/2706463002/diff/160001/chrome/browser/media/android/router/media_router_android.cc#newcode178 chrome/browser/media/android/router/media_router_android.cc:178: base::android::ConvertUTF8ToJavaString(env, message); There's ...
3 years, 9 months ago (2017-02-28 06:45:27 UTC) #26
yzshen1
https://codereview.chromium.org/2706463002/diff/160001/content/common/presentation/presentation_struct_traits.cc File content/common/presentation/presentation_struct_traits.cc (right): https://codereview.chromium.org/2706463002/diff/160001/content/common/presentation/presentation_struct_traits.cc#newcode38 content/common/presentation/presentation_struct_traits.cc:38: if (!base::IsStringUTF8(out->message) || On 2017/02/28 06:45:27, dcheng wrote: > ...
3 years, 9 months ago (2017-02-28 18:22:07 UTC) #27
mark a. foltz
Thanks for pointing out the extra copies. I updated the typemap to note that PCM ...
3 years, 9 months ago (2017-02-28 18:35:21 UTC) #28
dcheng
mojo lgtm https://codereview.chromium.org/2706463002/diff/160001/content/public/common/presentation_connection_message.h File content/public/common/presentation_connection_message.h (right): https://codereview.chromium.org/2706463002/diff/160001/content/public/common/presentation_connection_message.h#newcode46 content/public/common/presentation_connection_message.h:46: }; On 2017/02/28 18:35:21, mark a. foltz ...
3 years, 9 months ago (2017-03-01 00:55:50 UTC) #29
hubbe
https://codereview.chromium.org/2706463002/diff/180001/chrome/browser/media/cast_remoting_connector_unittest.cc File chrome/browser/media/cast_remoting_connector_unittest.cc (right): https://codereview.chromium.org/2706463002/diff/180001/chrome/browser/media/cast_remoting_connector_unittest.cc#newcode168 chrome/browser/media/cast_remoting_connector_unittest.cc:168: std::string text, I don't get why we're doing this. ...
3 years, 9 months ago (2017-03-01 01:05:57 UTC) #30
mark a. foltz
I reverted the Media Router changes. They were tangential to introducing the typemap and seemed ...
3 years, 9 months ago (2017-03-03 21:03:21 UTC) #44
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/2706463002/280001
3 years, 9 months ago (2017-03-06 20:59:34 UTC) #47
dcheng
https://codereview.chromium.org/2706463002/diff/160001/content/public/common/presentation_connection_message.h File content/public/common/presentation_connection_message.h (right): https://codereview.chromium.org/2706463002/diff/160001/content/public/common/presentation_connection_message.h#newcode46 content/public/common/presentation_connection_message.h:46: }; On 2017/03/03 21:03:21, mark a. foltz wrote: > ...
3 years, 9 months ago (2017-03-06 22:14:55 UTC) #48
mark a. foltz
On 2017/03/06 at 22:14:55, dcheng wrote: > https://codereview.chromium.org/2706463002/diff/160001/content/public/common/presentation_connection_message.h > File content/public/common/presentation_connection_message.h (right): > > https://codereview.chromium.org/2706463002/diff/160001/content/public/common/presentation_connection_message.h#newcode46 ...
3 years, 9 months ago (2017-03-06 22:17:45 UTC) #49
commit-bot: I haz the power
Try jobs failed on following builders: win_chromium_rel_ng on master.tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_rel_ng/builds/395131)
3 years, 9 months ago (2017-03-07 01:50:57 UTC) #51
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/2706463002/280001
3 years, 9 months ago (2017-03-07 15:45:05 UTC) #53
commit-bot: I haz the power
3 years, 9 months ago (2017-03-07 18:25:09 UTC) #56
Message was sent while issue was closed.
Committed patchset #15 (id:280001) as
https://chromium.googlesource.com/chromium/src/+/0dc2a6bdf85013def2fcbb1b157e...

Powered by Google App Engine
This is Rietveld 408576698