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

Issue 2646213002: Write mojom and StructTraits for DisplaySnapshot. (Closed)

Created:
3 years, 11 months ago by thanhph
Modified:
3 years, 9 months ago
CC:
chromium-reviews
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Write mojoms and StructTraits for DisplaySnapshot. We need to enable communication between the mus window server and mus gpu in the new split architecture of window server and gpu. DisplaySnapShot is abstract so DisplaySnapshotMojo is created to support mojom serialization/deserialization. Enum mojom and struct traits are also added for DisplayConnectionType. BUG=649366 Review-Url: https://codereview.chromium.org/2646213002 Cr-Commit-Position: refs/heads/master@{#455466} Committed: https://chromium.googlesource.com/chromium/src/+/e29136a35e8282ad38b3504915837eb26425918c

Patch Set 1 #

Patch Set 2 : Write mojom and StructTraits for DisplaySnapshot #

Patch Set 3 : Change function order. Clean up format. #

Patch Set 4 : Merge with ToT #

Patch Set 5 : try to deserialize modes(). #

Patch Set 6 : DisplaySnapshot struct traits #

Patch Set 7 : rebase #

Patch Set 8 : initalize empty vector. #

Patch Set 9 : fix base::FilePath return type #

Patch Set 10 : use StringPieceType to create base::FilePath #

Patch Set 11 : use base::FilePath::StringType instead of std::string in unittest #

Patch Set 12 : use FILE_PATH_LITERAL to create base::FilePath::StringType #

Total comments: 67

Patch Set 13 : Clean up codes #

Patch Set 14 : use filepath mojom #

Total comments: 34

Patch Set 15 : fix format/comments. Refactor structure/code. #

Total comments: 55

Patch Set 16 : Create more unit tests. Refactor/Enhance code readility/format. #

Total comments: 28

Patch Set 17 : Fix nits. #

Patch Set 18 : use std::numeric_limits<uint64_t>::max() instead of -1 #

Patch Set 19 : Add Clone() for DisplaySnapShotMojo and refactor unit test. #

Total comments: 30

Patch Set 20 : Fix nits. #

Total comments: 6

Patch Set 21 : fix nits. #

Total comments: 2

Patch Set 22 : fix nits. #

Total comments: 8

Patch Set 23 : Add back helper function CompareModes and revert changes in display_mode.(cc|h) #

Total comments: 10

Patch Set 24 : Fix nits. #

Patch Set 25 : Rebase. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+802 lines, -9 lines) Patch
M ui/display/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +2 lines, -0 lines 0 comments Download
A ui/display/display_snapshot_mojo.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 1 chunk +46 lines, -0 lines 0 comments Download
A ui/display/display_snapshot_mojo.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 1 chunk +64 lines, -0 lines 0 comments Download
M ui/display/mojo/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 1 chunk +3 lines, -0 lines 0 comments Download
A ui/display/mojo/display_constants.mojom View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +18 lines, -0 lines 0 comments Download
A ui/display/mojo/display_constants.typemap View 1 2 3 5 6 1 chunk +15 lines, -0 lines 0 comments Download
A ui/display/mojo/display_constants_struct_traits.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 1 chunk +24 lines, -0 lines 0 comments Download
A ui/display/mojo/display_constants_struct_traits.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +99 lines, -0 lines 0 comments Download
M ui/display/mojo/display_mode.typemap View 1 2 3 4 5 1 chunk +3 lines, -0 lines 0 comments Download
M ui/display/mojo/display_mode_struct_traits.h View 1 2 3 4 5 1 chunk +1 line, -8 lines 0 comments Download
A ui/display/mojo/display_mode_struct_traits.cc View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +24 lines, -0 lines 0 comments Download
A ui/display/mojo/display_snapshot_mojo.mojom View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +31 lines, -0 lines 0 comments Download
A ui/display/mojo/display_snapshot_mojo.typemap View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +17 lines, -0 lines 0 comments Download
A ui/display/mojo/display_snapshot_mojo_struct_traits.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +102 lines, -0 lines 0 comments Download
A ui/display/mojo/display_snapshot_mojo_struct_traits.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 1 chunk +139 lines, -0 lines 0 comments Download
M ui/display/mojo/display_struct_traits_test.mojom View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 2 chunks +5 lines, -0 lines 0 comments Download
M ui/display/mojo/display_struct_traits_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 4 chunks +207 lines, -1 line 0 comments Download
M ui/display/mojo/typemaps.gni View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 1 chunk +2 lines, -0 lines 0 comments Download

Messages

Total messages: 145 (107 generated)
thanhph1
@kylechar: Please review my cl. Thanks!
3 years, 11 months ago (2017-01-20 23:45:20 UTC) #6
thanhph1
On 2017/01/20 23:45:20, thanhph1 wrote: > @kylechar: Please review my cl. Thanks! Hi Kyle, Can ...
3 years, 10 months ago (2017-02-09 13:39:54 UTC) #36
kylechar
There are some duplicate implementations of the same mojom structs and StructTraits. I'm not really ...
3 years, 10 months ago (2017-02-09 15:05:54 UTC) #37
thanhph1
Thanks Kyle. Please review my new cl. Thanh. https://codereview.chromium.org/2646213002/diff/240001/ui/display/mojo/display_constants.mojom File ui/display/mojo/display_constants.mojom (right): https://codereview.chromium.org/2646213002/diff/240001/ui/display/mojo/display_constants.mojom#newcode7 ui/display/mojo/display_constants.mojom:7: // ...
3 years, 10 months ago (2017-02-10 19:54:33 UTC) #38
kylechar
https://codereview.chromium.org/2646213002/diff/280001/ui/display/BUILD.gn File ui/display/BUILD.gn (right): https://codereview.chromium.org/2646213002/diff/280001/ui/display/BUILD.gn#newcode33 ui/display/BUILD.gn:33: "mojo/display_snapshot_mojo.cc", I would move these files so they are ...
3 years, 10 months ago (2017-02-10 21:40:30 UTC) #41
kylechar
https://codereview.chromium.org/2646213002/diff/240001/ui/display/mojo/display_snapshot_mojo_struct_traits.cc File ui/display/mojo/display_snapshot_mojo_struct_traits.cc (right): https://codereview.chromium.org/2646213002/diff/240001/ui/display/mojo/display_snapshot_mojo_struct_traits.cc#newcode149 ui/display/mojo/display_snapshot_mojo_struct_traits.cc:149: for (int i = 0; i < (int)modes1.size(); i++) ...
3 years, 10 months ago (2017-02-10 21:43:30 UTC) #42
chromium-reviews
> > > https://codereview.chromium.org/2646213002/diff/280001/ui/ > display/mojo/display_snapshot_mojo.mojom#newcode25 > ui/display/mojo/display_snapshot_mojo.mojom:25: int64 > current_mode_index; > uint64? is probably ...
3 years, 10 months ago (2017-02-11 00:24:55 UTC) #45
thanhph1
Thanks Kyle. Please review my new cl. Thanh. https://codereview.chromium.org/2646213002/diff/280001/ui/display/mojo/display_constants.mojom File ui/display/mojo/display_constants.mojom (right): https://codereview.chromium.org/2646213002/diff/280001/ui/display/mojo/display_constants.mojom#newcode7 ui/display/mojo/display_constants.mojom:7: // ...
3 years, 10 months ago (2017-02-13 20:09:12 UTC) #47
kylechar
There are a number of things happening in this CL, so a good CL description ...
3 years, 10 months ago (2017-02-13 22:01:24 UTC) #52
thanhph1
Thanks Kyle. Please review my new cl. Thanh. https://codereview.chromium.org/2646213002/diff/320001/ui/display/display_snapshot_mojo.cc File ui/display/display_snapshot_mojo.cc (right): https://codereview.chromium.org/2646213002/diff/320001/ui/display/display_snapshot_mojo.cc#newcode52 ui/display/display_snapshot_mojo.cc:52: // ...
3 years, 10 months ago (2017-02-14 20:20:54 UTC) #53
kylechar
+rjkroege https://codereview.chromium.org/2646213002/diff/340001/ui/display/display_snapshot_mojo.cc File ui/display/display_snapshot_mojo.cc (right): https://codereview.chromium.org/2646213002/diff/340001/ui/display/display_snapshot_mojo.cc#newcode45 ui/display/display_snapshot_mojo.cc:45: // TODO(thanhph): What should ToString() output? Maybe for ...
3 years, 10 months ago (2017-02-14 21:35:28 UTC) #59
kylechar
Oh ya, please add a CL description!
3 years, 10 months ago (2017-02-14 21:40:38 UTC) #60
kylechar
Oh ya, please add a CL description!
3 years, 10 months ago (2017-02-14 21:40:40 UTC) #61
thanhph1
Thanks Kyle. Please review my new cl. Thanh. https://codereview.chromium.org/2646213002/diff/340001/ui/display/display_snapshot_mojo.cc File ui/display/display_snapshot_mojo.cc (right): https://codereview.chromium.org/2646213002/diff/340001/ui/display/display_snapshot_mojo.cc#newcode45 ui/display/display_snapshot_mojo.cc:45: // ...
3 years, 10 months ago (2017-02-15 15:37:56 UTC) #72
kylechar
Looks pretty good! A couple last small things and some comments on your test data. ...
3 years, 10 months ago (2017-02-15 16:48:45 UTC) #73
thanhph
Thanks Kyle. Please review my new patch. Thanh. https://codereview.chromium.org/2646213002/diff/420001/ui/display/display_snapshot_mojo.h File ui/display/display_snapshot_mojo.h (right): https://codereview.chromium.org/2646213002/diff/420001/ui/display/display_snapshot_mojo.h#newcode7 ui/display/display_snapshot_mojo.h:7: On ...
3 years, 10 months ago (2017-02-16 11:48:21 UTC) #88
kylechar
https://codereview.chromium.org/2646213002/diff/420001/ui/display/display_snapshot_mojo.h File ui/display/display_snapshot_mojo.h (right): https://codereview.chromium.org/2646213002/diff/420001/ui/display/display_snapshot_mojo.h#newcode33 ui/display/display_snapshot_mojo.h:33: virtual std::unique_ptr<DisplaySnapshotMojo> Clone() const; On 2017/02/16 11:48:20, thanhph wrote: ...
3 years, 10 months ago (2017-02-16 14:05:42 UTC) #89
thanhph1
Thanks Kyle. Please review my new cl. Thanh. https://codereview.chromium.org/2646213002/diff/480001/ui/display/mojo/display_struct_traits_unittest.cc File ui/display/mojo/display_struct_traits_unittest.cc (right): https://codereview.chromium.org/2646213002/diff/480001/ui/display/mojo/display_struct_traits_unittest.cc#newcode272 ui/display/mojo/display_struct_traits_unittest.cc:272: // ...
3 years, 10 months ago (2017-02-16 15:21:09 UTC) #94
kylechar
Your commit message line length is way over 72 characters. Change "DisplaySnapShot can't be instantiated" ...
3 years, 10 months ago (2017-02-16 19:56:46 UTC) #99
thanhph1
https://codereview.chromium.org/2646213002/diff/520001/ui/display/display_snapshot_mojo.h File ui/display/display_snapshot_mojo.h (right): https://codereview.chromium.org/2646213002/diff/520001/ui/display/display_snapshot_mojo.h#newcode35 ui/display/display_snapshot_mojo.h:35: virtual std::unique_ptr<DisplaySnapshotMojo> Clone() const; On 2017/02/16 19:56:46, kylechar wrote: ...
3 years, 10 months ago (2017-02-16 20:39:47 UTC) #101
kylechar
lgtm
3 years, 10 months ago (2017-02-16 20:45:22 UTC) #104
rjkroege
https://codereview.chromium.org/2646213002/diff/540001/ui/display/display_snapshot_mojo.cc File ui/display/display_snapshot_mojo.cc (right): https://codereview.chromium.org/2646213002/diff/540001/ui/display/display_snapshot_mojo.cc#newcode60 ui/display/display_snapshot_mojo.cc:60: std::string DisplaySnapshotMojo::ToString() const { My recollection is that this ...
3 years, 10 months ago (2017-02-17 03:03:51 UTC) #107
thanhph1
Thanks Rob, I made some changes below. Please review my cl. Thanh. https://codereview.chromium.org/2646213002/diff/540001/ui/display/display_snapshot_mojo.cc File ui/display/display_snapshot_mojo.cc ...
3 years, 10 months ago (2017-02-21 16:52:18 UTC) #115
thanhph1
@tsepez: Hi Tom, please review my mojom IPC struct traits. Thanks, Thanh.
3 years, 10 months ago (2017-02-24 15:12:25 UTC) #117
Tom Sepez
https://codereview.chromium.org/2646213002/diff/580001/ui/display/mojo/display_constants_struct_traits.cc File ui/display/mojo/display_constants_struct_traits.cc (right): https://codereview.chromium.org/2646213002/diff/580001/ui/display/mojo/display_constants_struct_traits.cc#newcode14 ui/display/mojo/display_constants_struct_traits.cc:14: case display::DisplayConnectionType::DISPLAY_CONNECTION_TYPE_NONE: So these values are defined as successive ...
3 years, 10 months ago (2017-02-24 17:05:21 UTC) #118
kylechar
https://codereview.chromium.org/2646213002/diff/580001/ui/display/mojo/display_constants_struct_traits.cc File ui/display/mojo/display_constants_struct_traits.cc (right): https://codereview.chromium.org/2646213002/diff/580001/ui/display/mojo/display_constants_struct_traits.cc#newcode14 ui/display/mojo/display_constants_struct_traits.cc:14: case display::DisplayConnectionType::DISPLAY_CONNECTION_TYPE_NONE: On 2017/02/24 17:05:21, Tom Sepez wrote: > ...
3 years, 10 months ago (2017-02-24 17:51:21 UTC) #119
Tom Sepez
OK, LGTM, given that you have full-up switch statements, the mojo side constants could be ...
3 years, 10 months ago (2017-02-24 18:22:23 UTC) #120
thanhph1
On 2017/02/24 18:22:23, Tom Sepez wrote: > OK, LGTM, given that you have full-up switch ...
3 years, 10 months ago (2017-02-24 18:25:51 UTC) #121
rjkroege
lgtm https://codereview.chromium.org/2646213002/diff/580001/ui/display/display_snapshot_mojo.h File ui/display/display_snapshot_mojo.h (right): https://codereview.chromium.org/2646213002/diff/580001/ui/display/display_snapshot_mojo.h#newcode16 ui/display/display_snapshot_mojo.h:16: // DisplaySnapshot implementation that can be used with ...
3 years, 9 months ago (2017-03-01 15:46:28 UTC) #122
thanhph1
Thanks Rob. I added a clean up bug. Thanh. https://codereview.chromium.org/2646213002/diff/580001/ui/display/display_snapshot_mojo.h File ui/display/display_snapshot_mojo.h (right): https://codereview.chromium.org/2646213002/diff/580001/ui/display/display_snapshot_mojo.h#newcode16 ui/display/display_snapshot_mojo.h:16: ...
3 years, 9 months ago (2017-03-01 16:29:08 UTC) #123
thanhph1
oshima@chromium.org: Hi Mitsuru, please review changes in ui/display tsepez@chromium.org: Hi Tom, please review changes in ...
3 years, 9 months ago (2017-03-01 16:49:52 UTC) #125
thanhph
Hi Dan, Mitsuru is OOO. Could you review my CL? Thanks, Thanh.
3 years, 9 months ago (2017-03-07 21:35:29 UTC) #127
Daniel Erat
lgtm for ui/display/ https://codereview.chromium.org/2646213002/diff/580001/ui/display/mojo/display_constants_struct_traits.cc File ui/display/mojo/display_constants_struct_traits.cc (right): https://codereview.chromium.org/2646213002/diff/580001/ui/display/mojo/display_constants_struct_traits.cc#newcode14 ui/display/mojo/display_constants_struct_traits.cc:14: case display::DisplayConnectionType::DISPLAY_CONNECTION_TYPE_NONE: On 2017/02/24 17:51:20, kylechar ...
3 years, 9 months ago (2017-03-07 23:47:01 UTC) #128
thanhph
Thanks for the review Dan! I updated the comment and remove the white space and ...
3 years, 9 months ago (2017-03-08 00:19:24 UTC) #129
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/2646213002/600001
3 years, 9 months ago (2017-03-08 00:20:17 UTC) #132
commit-bot: I haz the power
Try jobs failed on following builders: android_arm64_dbg_recipe on master.tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/android_arm64_dbg_recipe/builds/223906) android_clang_dbg_recipe on master.tryserver.chromium.android (JOB_FAILED, ...
3 years, 9 months ago (2017-03-08 00:26:06 UTC) #134
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/2646213002/620001
3 years, 9 months ago (2017-03-08 16:19:05 UTC) #142
commit-bot: I haz the power
3 years, 9 months ago (2017-03-08 16:25:36 UTC) #145
Message was sent while issue was closed.
Committed patchset #25 (id:620001) as
https://chromium.googlesource.com/chromium/src/+/e29136a35e8282ad38b350491583...

Powered by Google App Engine
This is Rietveld 408576698