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

Issue 2431473002: Change single-display screens to use ScreenBase and DisplayList. (Closed)

Created:
4 years, 2 months ago by riajiang
Modified:
4 years, 1 month ago
CC:
chromium-reviews, sadrul, posciak+watch_chromium.org, nyquist+watch-blimp_chromium.org, kmarshall+watch-blimp_chromium.org, shaktisahu+watch-blimp_chromium.org, miu+watch_chromium.org, extensions-reviews_chromium.org, maniscalco+watch-blimp_chromium.org, bgoldman+watch-blimp_chromium.org, lcwu+watch_chromium.org, jam, gcasto+watch-blimp_chromium.org, marcinjb+watch-blimp_chromium.org, jessicag+watch-blimp_chromium.org, darin-cc_chromium.org, halliwell+watch_chromium.org, kalyank, scf+watch-blimp_chromium.org, lethalantidote+watch-blimp_chromium.org, feature-media-reviews_chromium.org, mcasas+watch+vc_chromium.org, chromium-apps-reviews_chromium.org, alokp+watch_chromium.org, khushalsagar+watch-blimp_chromium.org, anandc+watch-blimp_chromium.org, sriramsr+watch-blimp_chromium.org, tfarina, steimel+watch-blimp_chromium.org, perumaal+watch-blimp_chromium.org, dtrainor+watch-blimp_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Change single-display screens to use ScreenBase and DisplayList. Reduce similar code in single-display screens. 1. ScreenBase doesn't set itself as the screen instance in display::Screen anymore, rather its subclass needs to decide if it wants to be the screen instance. 2. Moved Displays::iterator FindDisplayById(int64_t id); to private in DisplayList. 3. Fixed BlimpScreenTest since Display::SetScaleAndBounds also updates the work area of a display. 4. Fixed RenderWidgetHostViewAuraTest.PhysicalBackingSizeWithScale since added UpdateDisplay call in aura::TestScreen::SetDeviceScaleFactor. BUG=none, related to https://codereview.chromium.org/2361283002 TEST=covered by blimp_unittests, app_shell_unittests, content_unittests, unit_tests, mash_unittests, extensions_browsertests Committed: https://crrev.com/bcbb8c44d3e5d2bdc1da14867c3f05527e349d8b Cr-Commit-Position: refs/heads/master@{#430312}

Patch Set 1 #

Patch Set 2 : display, screen etc #

Total comments: 3

Patch Set 3 : . #

Patch Set 4 : FindDisplayById #

Patch Set 5 : const, rebase #

Patch Set 6 : test #

Patch Set 7 : message count #

Total comments: 10

Patch Set 8 : address comments #

Total comments: 5

Patch Set 9 : GetPrimaryDisplay() #

Total comments: 2

Patch Set 10 : rebase; nit #

Total comments: 4

Patch Set 11 : renderer test #

Unified diffs Side-by-side diffs Delta from patch set Stats (+214 lines, -389 lines) Patch
M ash/mus/root_window_controller.cc View 1 2 chunks +2 lines, -2 lines 0 comments Download
M ash/mus/test/wm_test_helper.cc View 1 2 1 chunk +3 lines, -3 lines 0 comments Download
M ash/mus/window_manager.cc View 1 4 chunks +8 lines, -4 lines 0 comments Download
M blimp/engine/app/ui/blimp_screen.h View 1 2 3 4 5 6 7 3 chunks +2 lines, -13 lines 0 comments Download
M blimp/engine/app/ui/blimp_screen.cc View 1 2 3 4 5 6 7 8 9 2 chunks +10 lines, -46 lines 0 comments Download
M blimp/engine/app/ui/blimp_screen_unittest.cc View 1 2 3 4 3 chunks +9 lines, -4 lines 0 comments Download
M chrome/browser/manifest/manifest_icon_selector_unittest.cc View 1 2 3 4 5 6 7 8 2 chunks +10 lines, -3 lines 0 comments Download
M chromecast/graphics/cast_screen.h View 1 2 3 4 5 6 7 3 chunks +2 lines, -13 lines 0 comments Download
M chromecast/graphics/cast_screen.cc View 1 2 3 4 5 6 7 8 9 2 chunks +5 lines, -30 lines 0 comments Download
M content/browser/media/capture/web_contents_video_capture_device_unittest.cc View 1 2 3 4 5 6 7 8 1 chunk +8 lines, -4 lines 0 comments Download
M content/browser/renderer_host/render_widget_host_view_aura_unittest.cc View 1 2 3 4 5 6 7 8 9 10 2 chunks +7 lines, -2 lines 0 comments Download
M extensions/shell/browser/shell_screen.h View 1 2 3 4 5 6 7 3 chunks +2 lines, -12 lines 0 comments Download
M extensions/shell/browser/shell_screen.cc View 1 2 3 4 5 6 7 8 9 4 chunks +10 lines, -32 lines 0 comments Download
M headless/lib/browser/headless_screen.h View 1 2 3 4 5 6 7 3 chunks +2 lines, -12 lines 0 comments Download
M headless/lib/browser/headless_screen.cc View 1 2 3 4 5 6 7 8 9 5 chunks +32 lines, -46 lines 0 comments Download
M ui/aura/test/test_screen.h View 1 2 3 4 5 6 7 5 chunks +2 lines, -15 lines 0 comments Download
M ui/aura/test/test_screen.cc View 1 2 3 4 5 6 7 8 9 5 chunks +34 lines, -50 lines 0 comments Download
M ui/display/display_list.h View 1 2 3 4 5 6 7 2 chunks +2 lines, -1 line 0 comments Download
M ui/display/display_list.cc View 1 2 3 4 5 6 7 5 chunks +12 lines, -11 lines 0 comments Download
M ui/display/screen_base.h View 1 2 3 4 5 6 7 8 9 2 chunks +8 lines, -7 lines 0 comments Download
M ui/display/screen_base.cc View 1 2 3 4 5 6 7 8 9 2 chunks +16 lines, -21 lines 0 comments Download
M ui/display/test/test_screen.h View 1 2 3 4 5 6 7 8 2 chunks +2 lines, -14 lines 0 comments Download
M ui/display/test/test_screen.cc View 1 2 3 4 5 6 7 8 9 2 chunks +4 lines, -29 lines 0 comments Download
M ui/views/mus/screen_mus.cc View 1 2 3 4 5 6 7 8 9 7 chunks +18 lines, -13 lines 0 comments Download
M ui/views/mus/window_manager_connection_unittest.cc View 1 2 3 4 5 6 7 8 9 1 chunk +4 lines, -2 lines 0 comments Download

Messages

Total messages: 57 (30 generated)
riajiang
Hi sadrul@ and sky@, PTAL. Thanks!
4 years, 2 months ago (2016-10-18 01:10:47 UTC) #4
sadrul
Some of the try failures look related. I think the failure happens because ScreenBase sets ...
4 years, 2 months ago (2016-10-19 15:27:50 UTC) #9
riajiang
Please take another look. Thanks!
4 years, 1 month ago (2016-10-26 23:41:27 UTC) #13
sky
https://codereview.chromium.org/2431473002/diff/100001/ui/display/display_list.h File ui/display/display_list.h (right): https://codereview.chromium.org/2431473002/diff/100001/ui/display/display_list.h#newcode56 ui/display/display_list.h:56: Displays& displays() { return displays_; } If you expose ...
4 years, 1 month ago (2016-10-27 00:05:13 UTC) #14
riajiang
https://codereview.chromium.org/2431473002/diff/100001/ui/display/display_list.h File ui/display/display_list.h (right): https://codereview.chromium.org/2431473002/diff/100001/ui/display/display_list.h#newcode56 ui/display/display_list.h:56: Displays& displays() { return displays_; } On 2016/10/27 00:05:13, ...
4 years, 1 month ago (2016-10-27 23:23:23 UTC) #16
sky
https://codereview.chromium.org/2431473002/diff/100001/ui/display/display_list.h File ui/display/display_list.h (right): https://codereview.chromium.org/2431473002/diff/100001/ui/display/display_list.h#newcode56 ui/display/display_list.h:56: Displays& displays() { return displays_; } On 2016/10/27 23:23:23, ...
4 years, 1 month ago (2016-10-27 23:38:33 UTC) #17
riajiang
On 2016/10/27 23:38:33, sky wrote: > https://codereview.chromium.org/2431473002/diff/100001/ui/display/display_list.h > File ui/display/display_list.h (right): > > https://codereview.chromium.org/2431473002/diff/100001/ui/display/display_list.h#newcode56 > ...
4 years, 1 month ago (2016-11-01 20:35:44 UTC) #22
riajiang
4 years, 1 month ago (2016-11-01 21:15:06 UTC) #23
sky
https://codereview.chromium.org/2431473002/diff/260001/chrome/browser/manifest/manifest_icon_selector_unittest.cc File chrome/browser/manifest/manifest_icon_selector_unittest.cc (right): https://codereview.chromium.org/2431473002/diff/260001/chrome/browser/manifest/manifest_icon_selector_unittest.cc#newcode27 chrome/browser/manifest/manifest_icon_selector_unittest.cc:27: if (display.id() != test_display.id()) { Why the if/else case? ...
4 years, 1 month ago (2016-11-01 21:15:36 UTC) #24
riajiang
https://codereview.chromium.org/2431473002/diff/260001/chrome/browser/manifest/manifest_icon_selector_unittest.cc File chrome/browser/manifest/manifest_icon_selector_unittest.cc (right): https://codereview.chromium.org/2431473002/diff/260001/chrome/browser/manifest/manifest_icon_selector_unittest.cc#newcode27 chrome/browser/manifest/manifest_icon_selector_unittest.cc:27: if (display.id() != test_display.id()) { On 2016/11/01 21:15:36, sky ...
4 years, 1 month ago (2016-11-02 01:23:13 UTC) #26
sky
https://codereview.chromium.org/2431473002/diff/300001/ui/aura/test/test_screen.cc File ui/aura/test/test_screen.cc (right): https://codereview.chromium.org/2431473002/diff/300001/ui/aura/test/test_screen.cc#newcode49 ui/aura/test/test_screen.cc:49: .CallWmNewDisplayAdded(*display_list().GetPrimaryDisplayIterator()); GetPrimaryDisplay()? https://codereview.chromium.org/2431473002/diff/300001/ui/aura/test/test_screen.cc#newcode52 ui/aura/test/test_screen.cc:52: display_list().GetPrimaryDisplayIterator()->GetSizeInPixel())); GetPrimaryDisplay()? https://codereview.chromium.org/2431473002/diff/300001/ui/aura/test/test_screen.cc#newcode63 ui/aura/test/test_screen.cc:63: display::Display ...
4 years, 1 month ago (2016-11-02 15:27:54 UTC) #27
riajiang
On 2016/11/02 15:27:54, sky wrote: > https://codereview.chromium.org/2431473002/diff/300001/ui/aura/test/test_screen.cc > File ui/aura/test/test_screen.cc (right): > > https://codereview.chromium.org/2431473002/diff/300001/ui/aura/test/test_screen.cc#newcode49 > ...
4 years, 1 month ago (2016-11-02 17:31:42 UTC) #28
sky
On Wed, Nov 2, 2016 at 10:31 AM, <riajiang@chromium.org> wrote: > On 2016/11/02 15:27:54, sky ...
4 years, 1 month ago (2016-11-02 18:09:49 UTC) #29
kylechar
On 2016/11/02 17:31:42, riajiang wrote: > But ScreenBase::GetPrimaryDisplay would make one more copy compared to ...
4 years, 1 month ago (2016-11-02 19:52:29 UTC) #30
riajiang
> This is certainly true, but this is test code, and it's better to have ...
4 years, 1 month ago (2016-11-02 23:12:52 UTC) #31
sky
LGTM - I'm not an owner of the all the directories you're changing. You'll need ...
4 years, 1 month ago (2016-11-02 23:17:38 UTC) #32
riajiang
+skyostil@chromium.org: Please review changes in headless/ +alokp@chromium.org: Please review changes in chromecast/ +jamescook@chromium.org: Please review ...
4 years, 1 month ago (2016-11-03 01:04:19 UTC) #34
Sami
headless/ lgtm, thanks! I've also kicked off a headless tryjob for you (it's not yet ...
4 years, 1 month ago (2016-11-03 11:51:56 UTC) #35
James Cook
extensions/shell lgtm with nit https://codereview.chromium.org/2431473002/diff/320001/extensions/shell/browser/shell_screen.cc File extensions/shell/browser/shell_screen.cc (right): https://codereview.chromium.org/2431473002/diff/320001/extensions/shell/browser/shell_screen.cc#newcode31 extensions/shell/browser/shell_screen.cc:31: ProcessDisplayChanged(display, true /*is_primary */); nit: ...
4 years, 1 month ago (2016-11-03 16:47:32 UTC) #36
alokp
chromecast/ lgtm
4 years, 1 month ago (2016-11-04 20:47:33 UTC) #38
miu
web_contents_video_capture_device_unittest.cc lgtm
4 years, 1 month ago (2016-11-04 21:15:47 UTC) #39
nyquist
blimp lgtm
4 years, 1 month ago (2016-11-04 21:35:17 UTC) #40
sadrul
lgtm https://codereview.chromium.org/2431473002/diff/360001/content/browser/renderer_host/render_widget_host_view_aura_unittest.cc File content/browser/renderer_host/render_widget_host_view_aura_unittest.cc (right): https://codereview.chromium.org/2431473002/diff/360001/content/browser/renderer_host/render_widget_host_view_aura_unittest.cc#newcode1517 content/browser/renderer_host/render_widget_host_view_aura_unittest.cc:1517: EXPECT_EQ(1u, sink_->message_count()); Add a comment here that changing ...
4 years, 1 month ago (2016-11-05 00:38:12 UTC) #45
riajiang
https://codereview.chromium.org/2431473002/diff/320001/extensions/shell/browser/shell_screen.cc File extensions/shell/browser/shell_screen.cc (right): https://codereview.chromium.org/2431473002/diff/320001/extensions/shell/browser/shell_screen.cc#newcode31 extensions/shell/browser/shell_screen.cc:31: ProcessDisplayChanged(display, true /*is_primary */); On 2016/11/03 16:47:32, James Cook ...
4 years, 1 month ago (2016-11-07 16:23:09 UTC) #46
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/2431473002/380001
4 years, 1 month ago (2016-11-07 17:50:55 UTC) #53
commit-bot: I haz the power
Committed patchset #11 (id:380001)
4 years, 1 month ago (2016-11-07 17:58:16 UTC) #55
commit-bot: I haz the power
4 years, 1 month ago (2016-11-07 18:14:34 UTC) #57
Message was sent while issue was closed.
Patchset 11 (id:??) landed as
https://crrev.com/bcbb8c44d3e5d2bdc1da14867c3f05527e349d8b
Cr-Commit-Position: refs/heads/master@{#430312}

Powered by Google App Engine
This is Rietveld 408576698