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

Issue 10905288: Switch primary display (Closed)

Created:
8 years, 3 months ago by oshima
Modified:
8 years, 3 months ago
Reviewers:
sky
CC:
chromium-reviews, mazda+watch_chromium.org, sadrul, yusukes+watch_chromium.org, derat+watch_chromium.org, ben+watch_chromium.org
Visibility:
Public.

Description

Add switch primary display option by swapping primary root window between displays. This has following sub-changes - DisplayController now manages which display is primary display, instead of relying on the order in DisplayManager - MultiDisplayManager uses display ID instead of order to check if a display has added/removed or its bounds has change. (which is fixes the TODO) - Primary display always has 0,0 origin. This also fixed a few issues that i discovered while working on this. - RootWindowHostLinux::SetBounds causes 2 ConfigureNotify, which causes unnecessary move/resize event. - mouse_cursor_event_filter and display_controller were using default_display_layout, which is wrong. It should use the layout for currently used secondary display. BUG=146886 TEST=covered by test. On device, press alt-f4 to switch primary display. Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=157492

Patch Set 1 : #

Patch Set 2 : #

Patch Set 3 : #

Patch Set 4 : #

Patch Set 5 : #

Total comments: 13

Patch Set 6 : #

Patch Set 7 : addressed comment #

Total comments: 3

Patch Set 8 : move mouse to far away #

Total comments: 2

Patch Set 9 : remove debug code #

Patch Set 10 : fixed the logic to set 0,0 for primary #

Patch Set 11 : sync. remove debug code that I uploaded by accident #

Patch Set 12 : #

Patch Set 13 : sync #

Unified diffs Side-by-side diffs Delta from patch set Stats (+604 lines, -225 lines) Patch
M ash/accelerators/accelerator_controller.cc View 1 5 chunks +15 lines, -3 lines 0 comments Download
M ash/accelerators/accelerator_controller_unittest.cc View 1 1 chunk +1 line, -1 line 0 comments Download
M ash/accelerators/accelerator_table.h View 1 1 chunk +1 line, -0 lines 0 comments Download
M ash/accelerators/accelerator_table.cc View 1 1 chunk +5 lines, -1 line 0 comments Download
M ash/display/display_controller.h View 1 2 3 4 5 6 6 chunks +25 lines, -3 lines 0 comments Download
M ash/display/display_controller.cc View 1 2 3 4 5 6 7 8 9 10 11 12 12 chunks +194 lines, -68 lines 0 comments Download
M ash/display/display_controller_unittest.cc View 1 2 2 chunks +91 lines, -0 lines 0 comments Download
M ash/display/mouse_cursor_event_filter.cc View 1 2 3 4 5 4 chunks +9 lines, -13 lines 0 comments Download
M ash/display/multi_display_manager.h View 1 2 3 4 5 6 4 chunks +30 lines, -9 lines 0 comments Download
M ash/display/multi_display_manager.cc View 1 2 3 4 5 6 7 8 9 10 16 chunks +153 lines, -77 lines 0 comments Download
M ash/display/multi_display_manager_unittest.cc View 1 5 chunks +14 lines, -10 lines 0 comments Download
M ash/extended_desktop_unittest.cc View 1 2 3 4 5 6 7 8 9 1 chunk +1 line, -2 lines 0 comments Download
M ash/screen_ash.h View 1 chunk +4 lines, -0 lines 0 comments Download
M ash/screen_ash.cc View 1 2 3 4 5 3 chunks +7 lines, -1 line 0 comments Download
M ash/shell.cc View 1 2 3 4 5 6 4 chunks +10 lines, -12 lines 0 comments Download
M ash/system/tray_display.cc View 1 2 chunks +3 lines, -1 line 0 comments Download
M ash/test/ash_test_base.cc View 1 2 3 4 5 6 7 3 chunks +10 lines, -3 lines 0 comments Download
M ash/wm/system_gesture_event_filter_unittest.cc View 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/chromeos/display/display_preferences.cc View 1 chunk +2 lines, -7 lines 0 comments Download
M chrome/browser/ui/webui/options/chromeos/display_options_handler.cc View 1 2 3 4 2 chunks +6 lines, -4 lines 0 comments Download
M ui/aura/display_manager.h View 2 chunks +5 lines, -3 lines 0 comments Download
M ui/aura/root_window_host_linux.cc View 1 2 3 4 5 6 7 8 11 1 chunk +14 lines, -4 lines 0 comments Download
M ui/aura/single_display_manager.h View 1 chunk +1 line, -1 line 0 comments Download
M ui/aura/single_display_manager.cc View 1 1 chunk +2 lines, -1 line 0 comments Download

Messages

Total messages: 10 (0 generated)
oshima
8 years, 3 months ago (2012-09-17 23:58:41 UTC) #1
sky
http://codereview.chromium.org/10905288/diff/16001/ash/display/display_controller.cc File ash/display/display_controller.cc (right): http://codereview.chromium.org/10905288/diff/16001/ash/display/display_controller.cc#newcode73 ash/display/display_controller.cc:73: default: remove default and put NOTREACHED outside of switch ...
8 years, 3 months ago (2012-09-18 03:52:47 UTC) #2
oshima
http://codereview.chromium.org/10905288/diff/16001/ash/display/display_controller.cc File ash/display/display_controller.cc (right): http://codereview.chromium.org/10905288/diff/16001/ash/display/display_controller.cc#newcode73 ash/display/display_controller.cc:73: default: On 2012/09/18 03:52:47, sky wrote: > remove default ...
8 years, 3 months ago (2012-09-18 09:30:48 UTC) #3
oshima
forgot to add. http://codereview.chromium.org/10905288/diff/27001/ui/aura/root_window_host_linux.cc File ui/aura/root_window_host_linux.cc (right): http://codereview.chromium.org/10905288/diff/27001/ui/aura/root_window_host_linux.cc#newcode43 ui/aura/root_window_host_linux.cc:43: #include "base/debug/stack_trace.h" i'll remove this. http://codereview.chromium.org/10905288/diff/27001/ui/aura/root_window_host_linux.cc#newcode768 ...
8 years, 3 months ago (2012-09-18 15:32:09 UTC) #4
sky
LGTM
8 years, 3 months ago (2012-09-18 18:11:09 UTC) #5
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/oshima@chromium.org/10905288/21028
8 years, 3 months ago (2012-09-18 19:26:05 UTC) #6
commit-bot: I haz the power
Retried try job too often for step(s) browser_tests
8 years, 3 months ago (2012-09-18 21:09:10 UTC) #7
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/oshima@chromium.org/10905288/13012
8 years, 3 months ago (2012-09-19 00:05:34 UTC) #8
commit-bot: I haz the power
Failed to apply patch for ash/display/display_controller.cc: While running patch -p1 --forward --force; patching file ash/display/display_controller.cc ...
8 years, 3 months ago (2012-09-19 00:05:41 UTC) #9
commit-bot: I haz the power
8 years, 3 months ago (2012-09-19 00:42:03 UTC) #10

Powered by Google App Engine
This is Rietveld 408576698