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

Issue 1939133002: StructTraits to map mus::mojom::Event to unique_ptr<ui::Event> (Closed)

Created:
4 years, 7 months ago by Hadi
Modified:
4 years, 6 months ago
CC:
Aaron Boodman, abarth-chromium, ben+mojo_chromium.org, chromium-reviews, darin (slow to review), kalyank, qsr+mojo_chromium.org, rjkroege, sadrul, tdresser+watch_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

StructTraits to map mus::mojom::Event to unique_ptr<ui::Event>. This CL defines StructTraits<mus::mojom::Event, unique_ptr<ui::Event>>. With this mojo automatically uses unique_ptr<ui::Event> instead of mus::mojom::Event when generating C++ header files for mojom interfaces, and events are automatically serializied/deserialized and validated when sending/receiving over mojo IPC. BUG=578206 Committed: https://crrev.com/73be633b0f9b71668ab204c22bd14742bd6c7ead Cr-Commit-Position: refs/heads/master@{#398107}

Patch Set 1 #

Patch Set 2 : #

Patch Set 3 : #

Patch Set 4 : #

Patch Set 5 : #

Patch Set 6 : rebase #

Patch Set 7 : fixed link errors #

Patch Set 8 : #

Patch Set 9 : #

Patch Set 10 : #

Patch Set 11 : #

Patch Set 12 : #

Patch Set 13 : rebase #

Patch Set 14 : Fix unittests. #

Patch Set 15 : #

Patch Set 16 : rebase #

Patch Set 17 : todo comments + reorganize files #

Total comments: 12

Patch Set 18 : addressed feedback. #

Patch Set 19 : small fix in native_widget_mus_unittest. #

Patch Set 20 : Use pass_by_value(). #

Total comments: 14

Patch Set 21 : Addressed feedback. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+511 lines, -86 lines) Patch
M ash/mus/accelerator_registrar_impl.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +1 line, -2 lines 0 comments Download
M ash/mus/accelerator_registrar_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +5 lines, -4 lines 0 comments Download
M ash/mus/accelerator_registrar_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 1 chunk +1 line, -1 line 0 comments Download
M ash/mus/window_manager_application.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 chunk +1 line, -1 line 0 comments Download
M components/mus/public/cpp/lib/window_tree_client.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 4 chunks +27 lines, -17 lines 0 comments Download
M components/mus/public/cpp/tests/window_tree_client_private.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 2 chunks +3 lines, -1 line 0 comments Download
M components/mus/public/cpp/tests/window_tree_client_private.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 1 chunk +2 lines, -2 lines 0 comments Download
M components/mus/public/cpp/tests/window_tree_client_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 18 19 6 chunks +11 lines, -12 lines 0 comments Download
M components/mus/public/cpp/window_tree_client.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 2 chunks +3 lines, -3 lines 0 comments Download
M components/mus/ws/test_change_tracker.h View 1 2 3 4 5 6 7 8 9 1 chunk +2 lines, -2 lines 0 comments Download
M components/mus/ws/test_change_tracker.cc View 1 2 3 4 5 6 7 8 9 1 chunk +4 lines, -4 lines 0 comments Download
M components/mus/ws/test_utils.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 2 chunks +3 lines, -3 lines 0 comments Download
M components/mus/ws/test_utils.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 2 chunks +6 lines, -5 lines 0 comments Download
M components/mus/ws/window_manager_state_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 9 chunks +9 lines, -9 lines 0 comments Download
M components/mus/ws/window_tree.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 2 chunks +5 lines, -3 lines 0 comments Download
M components/mus/ws/window_tree_client_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 4 chunks +4 lines, -4 lines 0 comments Download
M components/mus/ws/window_tree_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 7 chunks +7 lines, -7 lines 0 comments Download
M mash/app_driver/app_driver.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 1 chunk +1 line, -1 line 0 comments Download
M mash/app_driver/app_driver.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 1 chunk +1 line, -1 line 0 comments Download
M mojo/public/tools/bindings/chromium_bindings_configuration.gni View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +1 line, -0 lines 0 comments Download
A ui/events/mojo/event.typemap View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 1 chunk +17 lines, -0 lines 0 comments Download
A ui/events/mojo/event_struct_traits.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +32 lines, -0 lines 0 comments Download
A ui/events/mojo/event_struct_traits.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 1 chunk +363 lines, -0 lines 0 comments Download
A + ui/events/mojo/typemaps.gni View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 chunk +1 line, -3 lines 0 comments Download
M ui/views/mus/native_widget_mus_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 19 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 22 (6 generated)
Hadi
PTAL. 1. I kept the same structure of input_event_type_converters.cc for event_struct_traits.cc, but will clean it ...
4 years, 6 months ago (2016-06-03 19:02:03 UTC) #3
sky
https://codereview.chromium.org/1939133002/diff/320001/components/mus/public/cpp/tests/window_tree_client_private.cc File components/mus/public/cpp/tests/window_tree_client_private.cc (right): https://codereview.chromium.org/1939133002/diff/320001/components/mus/public/cpp/tests/window_tree_client_private.cc#newcode44 components/mus/public/cpp/tests/window_tree_client_private.cc:44: std::move(event), observer_id); Does this really work? If it does, ...
4 years, 6 months ago (2016-06-03 20:06:51 UTC) #4
James Cook
On 2016/06/03 20:06:51, sky wrote: > https://codereview.chromium.org/1939133002/diff/320001/components/mus/public/cpp/tests/window_tree_client_private.cc > File components/mus/public/cpp/tests/window_tree_client_private.cc (right): > > https://codereview.chromium.org/1939133002/diff/320001/components/mus/public/cpp/tests/window_tree_client_private.cc#newcode44 > ...
4 years, 6 months ago (2016-06-03 20:25:39 UTC) #5
Hadi
https://codereview.chromium.org/1939133002/diff/320001/components/mus/public/cpp/tests/window_tree_client_private.cc File components/mus/public/cpp/tests/window_tree_client_private.cc (right): https://codereview.chromium.org/1939133002/diff/320001/components/mus/public/cpp/tests/window_tree_client_private.cc#newcode44 components/mus/public/cpp/tests/window_tree_client_private.cc:44: std::move(event), observer_id); On 2016/06/03 20:06:50, sky wrote: > Does ...
4 years, 6 months ago (2016-06-06 13:48:33 UTC) #6
Hadi
On 2016/06/03 20:25:39, James Cook wrote: > Drive-by question (not a suggestion): It looks like ...
4 years, 6 months ago (2016-06-06 13:54:59 UTC) #7
Hadi
On 2016/06/06 13:54:59, Hadi wrote: > On 2016/06/03 20:25:39, James Cook wrote: > > Drive-by ...
4 years, 6 months ago (2016-06-06 13:56:53 UTC) #8
Ken Rockot(use gerrit already)
Sorry to catch this so late but I think this typemap should really use the ...
4 years, 6 months ago (2016-06-06 14:03:34 UTC) #9
Hadi
https://codereview.chromium.org/1939133002/diff/320001/components/mus/public/cpp/tests/window_tree_client_private.cc File components/mus/public/cpp/tests/window_tree_client_private.cc (right): https://codereview.chromium.org/1939133002/diff/320001/components/mus/public/cpp/tests/window_tree_client_private.cc#newcode44 components/mus/public/cpp/tests/window_tree_client_private.cc:44: std::move(event), observer_id); On 2016/06/06 13:48:32, Hadi wrote: > On ...
4 years, 6 months ago (2016-06-06 14:35:27 UTC) #10
Hadi
On 2016/06/06 14:03:34, Ken Rockot wrote: > Sorry to catch this so late but I ...
4 years, 6 months ago (2016-06-06 14:36:13 UTC) #11
sky
LGTM
4 years, 6 months ago (2016-06-06 17:09:56 UTC) #12
sadrul
https://codereview.chromium.org/1939133002/diff/380001/ui/events/mojo/event_struct_traits.cc File ui/events/mojo/event_struct_traits.cc (right): https://codereview.chromium.org/1939133002/diff/380001/ui/events/mojo/event_struct_traits.cc#newcode204 ui/events/mojo/event_struct_traits.cc:204: if (!event->IsPointerEvent() && !event->IsMouseWheelEvent()) Use has_pointer_data()? https://codereview.chromium.org/1939133002/diff/380001/ui/events/mojo/event_struct_traits.cc#newcode295 ui/events/mojo/event_struct_traits.cc:295: } ...
4 years, 6 months ago (2016-06-06 17:10:59 UTC) #13
Hadi
https://codereview.chromium.org/1939133002/diff/380001/ui/events/mojo/event_struct_traits.cc File ui/events/mojo/event_struct_traits.cc (right): https://codereview.chromium.org/1939133002/diff/380001/ui/events/mojo/event_struct_traits.cc#newcode204 ui/events/mojo/event_struct_traits.cc:204: if (!event->IsPointerEvent() && !event->IsMouseWheelEvent()) On 2016/06/06 17:10:59, sadrul wrote: ...
4 years, 6 months ago (2016-06-06 17:45:48 UTC) #14
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1939133002/400001
4 years, 6 months ago (2016-06-06 18:05:50 UTC) #17
sadrul
lgtm In a follow-up CL, please add some tests like the latency-info tests Fady is ...
4 years, 6 months ago (2016-06-06 18:57:51 UTC) #18
commit-bot: I haz the power
Committed patchset #21 (id:400001)
4 years, 6 months ago (2016-06-06 20:12:30 UTC) #20
commit-bot: I haz the power
4 years, 6 months ago (2016-06-06 20:15:01 UTC) #22
Message was sent while issue was closed.
Patchset 21 (id:??) landed as
https://crrev.com/73be633b0f9b71668ab204c22bd14742bd6c7ead
Cr-Commit-Position: refs/heads/master@{#398107}

Powered by Google App Engine
This is Rietveld 408576698