Chromium Code Reviews
[email protected] (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(756)

Issue 2434923002: Handle modified displays in mustash. (Closed)

Created:
4 years, 2 months ago by kylechar
Modified:
4 years, 1 month ago
Reviewers:
Tom Sepez, sky
CC:
chromium-reviews, rjkroege, sadrul, qsr+mojo_chromium.org, viettrungluu+watch_chromium.org, yzshen+watch_chromium.org, abarth-chromium, Aaron Boodman, kalyank, darin (slow to review)
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Handle modified displays in mustash. Big CL that fixes many small things related to display information being propagated when a display is modified. The primary change is that ws::DisplayManager now handles OnDisplayModified() calls. This entails the following steps: 1. The PlatformDisplay corresponding to the display is updated. 2. Mus sends an IPC to WM clients telling them the display has changed. This requires a new message in mojom::WindowManager and new method in WindowManagerDelegate. 3. Update the root ServerWindow for the display. 4. Mus sends an IPC to any other clients telling them the display has changed. The ViewportMetrics class is moved from src/services/ui/ws/ to src/services/ui/display so that it can be used in PlatformScreenDelegate. PlatformScreen now implements ui::DisplayController::StateController so it can pick the display size. A message is added to mojom::TestDisplayController to trigger changing the display size. This allows developers to try the functionality. An unused ash developer keyboard shortcut is used to trigger changing the display size. This shortcut is only temporary until settings are working. Another small part of this change is the display insets are sent from ash to PlatformScreen. This is tangentially related as it relies on DisplayManager::OnDisplayModified() working. BUG=641012 Committed: https://crrev.com/a06c6ea472e2ea1bf14fd34eb1092c7ef30bbdd4 Cr-Commit-Position: refs/heads/master@{#426830}

Patch Set 1 #

Patch Set 2 : Fixes after initial review. #

Total comments: 16

Patch Set 3 : Address comments from sky. #

Patch Set 4 : Change where Screen gets updated. #

Patch Set 5 : Fix broken test. #

Patch Set 6 : Fix non CrOS builds. #

Patch Set 7 : Fix PlatformScreenStub for tests. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+462 lines, -236 lines) Patch
M ash/mus/accelerators/accelerator_controller_delegate_mus.h View 1 2 3 chunks +2 lines, -4 lines 0 comments Download
M ash/mus/accelerators/accelerator_controller_delegate_mus.cc View 1 2 3 4 5 5 chunks +23 lines, -11 lines 0 comments Download
M ash/mus/bridge/wm_shell_mus.cc View 1 2 1 chunk +1 line, -1 line 0 comments Download
M ash/mus/root_window_controller.h View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M ash/mus/root_window_controller.cc View 1 2 3 1 chunk +18 lines, -11 lines 0 comments Download
M ash/mus/window_manager.h View 1 2 4 chunks +7 lines, -0 lines 0 comments Download
M ash/mus/window_manager.cc View 1 2 3 4 chunks +21 lines, -0 lines 0 comments Download
M services/ui/demo/mus_demo.h View 1 chunk +1 line, -0 lines 0 comments Download
M services/ui/demo/mus_demo.cc View 1 chunk +2 lines, -0 lines 0 comments Download
M services/ui/display/BUILD.gn View 1 2 1 chunk +2 lines, -0 lines 0 comments Download
M services/ui/display/platform_screen_delegate.h View 1 chunk +9 lines, -15 lines 0 comments Download
M services/ui/display/platform_screen_ozone.h View 1 2 6 chunks +26 lines, -8 lines 0 comments Download
M services/ui/display/platform_screen_ozone.cc View 1 2 9 chunks +86 lines, -27 lines 0 comments Download
M services/ui/display/platform_screen_ozone_unittests.cc View 1 2 3 4 4 chunks +11 lines, -18 lines 0 comments Download
M services/ui/display/platform_screen_stub.h View 1 2 2 chunks +5 lines, -1 line 0 comments Download
M services/ui/display/platform_screen_stub.cc View 1 2 3 4 5 6 4 chunks +23 lines, -13 lines 0 comments Download
A services/ui/display/viewport_metrics.h View 1 2 1 chunk +36 lines, -0 lines 0 comments Download
A services/ui/display/viewport_metrics.cc View 1 2 1 chunk +39 lines, -0 lines 0 comments Download
M services/ui/public/cpp/tests/window_server_test_base.h View 1 chunk +1 line, -0 lines 0 comments Download
M services/ui/public/cpp/tests/window_server_test_base.cc View 1 chunk +6 lines, -0 lines 0 comments Download
M services/ui/public/cpp/window_manager_delegate.h View 1 chunk +3 lines, -0 lines 0 comments Download
M services/ui/public/cpp/window_tree_client.h View 1 chunk +1 line, -0 lines 0 comments Download
M services/ui/public/cpp/window_tree_client.cc View 1 chunk +5 lines, -0 lines 0 comments Download
M services/ui/public/interfaces/display/test_display_controller.mojom View 1 chunk +3 lines, -0 lines 0 comments Download
M services/ui/public/interfaces/window_manager.mojom View 1 chunk +4 lines, -0 lines 0 comments Download
M services/ui/test_wm/test_wm.cc View 1 chunk +1 line, -0 lines 0 comments Download
M services/ui/ws/BUILD.gn View 1 chunk +0 lines, -1 line 0 comments Download
M services/ui/ws/display.h View 3 chunks +3 lines, -3 lines 0 comments Download
M services/ui/ws/display.cc View 3 chunks +10 lines, -14 lines 0 comments Download
M services/ui/ws/display_manager.h View 1 chunk +2 lines, -6 lines 0 comments Download
M services/ui/ws/display_manager.cc View 3 chunks +26 lines, -12 lines 0 comments Download
M services/ui/ws/frame_generator.cc View 1 2 3 4 5 1 chunk +1 line, -2 lines 0 comments Download
M services/ui/ws/frame_generator_delegate.h View 2 chunks +2 lines, -2 lines 0 comments Download
M services/ui/ws/platform_display.h View 1 2 3 4 5 5 chunks +10 lines, -12 lines 0 comments Download
M services/ui/ws/platform_display.cc View 1 2 3 4 5 4 chunks +24 lines, -32 lines 0 comments Download
M services/ui/ws/platform_display_delegate.h View 2 chunks +0 lines, -5 lines 0 comments Download
M services/ui/ws/platform_display_init_params.h View 2 chunks +2 lines, -3 lines 0 comments Download
M services/ui/ws/test_utils.h View 2 chunks +3 lines, -2 lines 0 comments Download
M services/ui/ws/test_utils.cc View 1 2 3 4 5 2 chunks +12 lines, -8 lines 0 comments Download
D services/ui/ws/viewport_metrics.h View 1 chunk +0 lines, -23 lines 0 comments Download
M services/ui/ws/window_manager_client_unittest.cc View 1 chunk +1 line, -0 lines 0 comments Download
M services/ui/ws/window_tree.h View 1 chunk +3 lines, -0 lines 0 comments Download
M services/ui/ws/window_tree.cc View 1 chunk +4 lines, -0 lines 0 comments Download
M services/ui/ws/window_tree_client_unittest.cc View 1 chunk +3 lines, -0 lines 0 comments Download
M ui/display/display_list.h View 1 2 chunks +7 lines, -2 lines 0 comments Download
M ui/display/display_list.cc View 1 2 chunks +12 lines, -0 lines 0 comments Download

Messages

Total messages: 24 (13 generated)
kylechar
+sky for everything except security review.
4 years, 2 months ago (2016-10-19 21:35:45 UTC) #2
sky
https://codereview.chromium.org/2434923002/diff/20001/ash/mus/accelerators/accelerator_controller_delegate_mus.cc File ash/mus/accelerators/accelerator_controller_delegate_mus.cc (right): https://codereview.chromium.org/2434923002/diff/20001/ash/mus/accelerators/accelerator_controller_delegate_mus.cc#newcode107 ash/mus/accelerators/accelerator_controller_delegate_mus.cc:107: // TODO(kylechar): This is hack. I'm just stealing the ...
4 years, 2 months ago (2016-10-19 23:38:00 UTC) #3
kylechar
https://codereview.chromium.org/2434923002/diff/20001/ash/mus/accelerators/accelerator_controller_delegate_mus.cc File ash/mus/accelerators/accelerator_controller_delegate_mus.cc (right): https://codereview.chromium.org/2434923002/diff/20001/ash/mus/accelerators/accelerator_controller_delegate_mus.cc#newcode107 ash/mus/accelerators/accelerator_controller_delegate_mus.cc:107: // TODO(kylechar): This is hack. I'm just stealing the ...
4 years, 2 months ago (2016-10-20 15:04:20 UTC) #4
sky
https://codereview.chromium.org/2434923002/diff/20001/ash/mus/window_manager.cc File ash/mus/window_manager.cc (right): https://codereview.chromium.org/2434923002/diff/20001/ash/mus/window_manager.cc#newcode339 ash/mus/window_manager.cc:339: controller->set_display(display); On 2016/10/20 15:04:19, kylechar wrote: > On 2016/10/19 ...
4 years, 2 months ago (2016-10-20 15:33:25 UTC) #5
kylechar
https://codereview.chromium.org/2434923002/diff/20001/ash/mus/window_manager.cc File ash/mus/window_manager.cc (right): https://codereview.chromium.org/2434923002/diff/20001/ash/mus/window_manager.cc#newcode339 ash/mus/window_manager.cc:339: controller->set_display(display); On 2016/10/20 15:33:24, sky wrote: > On 2016/10/20 ...
4 years, 2 months ago (2016-10-20 18:31:29 UTC) #6
sky
LGTM
4 years, 2 months ago (2016-10-20 20:15:44 UTC) #7
kylechar
Thanks sky! +tsepez for *.mojom
4 years, 2 months ago (2016-10-20 20:16:33 UTC) #9
Tom Sepez
mojom lgtm
4 years, 2 months ago (2016-10-20 20:26:50 UTC) #10
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/2434923002/120001
4 years, 1 month ago (2016-10-21 16:12:35 UTC) #21
commit-bot: I haz the power
Committed patchset #7 (id:120001)
4 years, 1 month ago (2016-10-21 17:35:33 UTC) #22
commit-bot: I haz the power
4 years, 1 month ago (2016-10-21 17:41:11 UTC) #24
Message was sent while issue was closed.
Patchset 7 (id:??) landed as
https://crrev.com/a06c6ea472e2ea1bf14fd34eb1092c7ef30bbdd4
Cr-Commit-Position: refs/heads/master@{#426830}

Powered by Google App Engine
This is Rietveld 408576698