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

Issue 1639623003: ScreenWin Testability and Restructuring (Closed)

Created:
4 years, 11 months ago by robliao
Modified:
4 years, 10 months ago
Reviewers:
Nico, oshima, sky
CC:
chromium-reviews, scottmg
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

ScreenWin Testability and Restructuring To allow easier testing of ScreenWin, this CL restructures ScreenWin to allow override of system OS calls through virtual methods as well as override the available displays available in the system. This CL also adds support to hold system pixel display rects that will be used by multi-DPI aware scaling coming in a later CL. BUG=426656 Committed: https://crrev.com/663b48643605198c21bfb8b8f81968223833021f Cr-Commit-Position: refs/heads/master@{#373582} Committed: https://crrev.com/eb17ae163b2ba4a2a67cd88a25b349249ed63f71 Cr-Commit-Position: refs/heads/master@{#374208}

Patch Set 1 #

Total comments: 49

Patch Set 2 : CR Feedback #

Patch Set 3 : Rebase to bdd95f1 #

Total comments: 15

Patch Set 4 : CR Feedback #

Total comments: 10

Patch Set 5 : CR Feedback #

Patch Set 6 : CR Feedback #

Total comments: 2

Patch Set 7 : #

Total comments: 12

Patch Set 8 : CR Feedback #

Patch Set 9 : Fix Consts #

Patch Set 10 : Sync + VS2015 Friendly - struct -> class to maintain immutability #

Unified diffs Side-by-side diffs Delta from patch set Stats (+997 lines, -139 lines) Patch
M ui/gfx/BUILD.gn View 1 2 3 4 5 6 7 8 9 3 chunks +5 lines, -0 lines 0 comments Download
M ui/gfx/display.h View 1 2 1 chunk +5 lines, -0 lines 0 comments Download
M ui/gfx/gfx.gyp View 1 2 3 4 5 6 3 chunks +5 lines, -0 lines 0 comments Download
M ui/gfx/screen_win.h View 1 2 3 4 5 6 8 9 3 chunks +48 lines, -11 lines 0 comments Download
M ui/gfx/screen_win.cc View 1 2 3 4 5 6 7 8 9 5 chunks +136 lines, -109 lines 0 comments Download
M ui/gfx/screen_win_unittest.cc View 1 2 3 4 5 6 9 2 chunks +592 lines, -19 lines 0 comments Download
A ui/gfx/test/display_util.h View 1 1 chunk +23 lines, -0 lines 0 comments Download
M ui/gfx/test/gfx_util.cc View 2 chunks +5 lines, -0 lines 0 comments Download
A ui/gfx/win/display_info.h View 1 2 3 4 5 6 7 8 9 1 chunk +44 lines, -0 lines 0 comments Download
A ui/gfx/win/display_info.cc View 1 2 3 4 5 6 7 8 9 1 chunk +60 lines, -0 lines 0 comments Download
A ui/gfx/win/screen_win_display.h View 1 2 3 4 5 6 7 8 9 1 chunk +36 lines, -0 lines 0 comments Download
A ui/gfx/win/screen_win_display.cc View 1 2 3 4 5 6 7 8 9 1 chunk +38 lines, -0 lines 0 comments Download

Messages

Total messages: 89 (38 generated)
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1639623003/1 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1639623003/1
4 years, 11 months ago (2016-01-26 00:01:26 UTC) #2
robliao
oshima: Please review this CL. It introduces testability to ScreenWin as well as prepares the ...
4 years, 11 months ago (2016-01-26 00:22:16 UTC) #5
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 11 months ago (2016-01-26 01:27:01 UTC) #7
oshima
https://codereview.chromium.org/1639623003/diff/1/ui/gfx/display.h File ui/gfx/display.h (right): https://codereview.chromium.org/1639623003/diff/1/ui/gfx/display.h#newcode164 ui/gfx/display.h:164: } One concern I have is that this differ ...
4 years, 10 months ago (2016-01-28 18:32:05 UTC) #8
robliao
Thanks for the review! https://codereview.chromium.org/1639623003/diff/1/ui/gfx/display.h File ui/gfx/display.h (right): https://codereview.chromium.org/1639623003/diff/1/ui/gfx/display.h#newcode164 ui/gfx/display.h:164: } On 2016/01/28 18:32:04, oshima ...
4 years, 10 months ago (2016-01-29 01:44:41 UTC) #11
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1639623003/60001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1639623003/60001
4 years, 10 months ago (2016-01-29 02:02:48 UTC) #13
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: win_chromium_compile_dbg_ng on tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_compile_dbg_ng/builds/137970)
4 years, 10 months ago (2016-01-29 02:41:03 UTC) #15
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1639623003/80001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1639623003/80001
4 years, 10 months ago (2016-01-29 19:03:32 UTC) #17
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 10 months ago (2016-01-29 20:37:00 UTC) #19
oshima
https://codereview.chromium.org/1639623003/diff/80001/ui/gfx/screen_win.h File ui/gfx/screen_win.h (right): https://codereview.chromium.org/1639623003/diff/80001/ui/gfx/screen_win.h#newcode67 ui/gfx/screen_win.h:67: gfx::win::DisplayManager* display_manager_; Please use GetInstance(), as it may refer ...
4 years, 10 months ago (2016-01-30 00:10:33 UTC) #20
robliao
https://codereview.chromium.org/1639623003/diff/80001/ui/gfx/screen_win.h File ui/gfx/screen_win.h (right): https://codereview.chromium.org/1639623003/diff/80001/ui/gfx/screen_win.h#newcode67 ui/gfx/screen_win.h:67: gfx::win::DisplayManager* display_manager_; On 2016/01/30 00:10:33, oshima wrote: > Please ...
4 years, 10 months ago (2016-01-30 01:23:52 UTC) #21
oshima
https://codereview.chromium.org/1639623003/diff/1/ui/gfx/screen_win_unittest.cc File ui/gfx/screen_win_unittest.cc (right): https://codereview.chromium.org/1639623003/diff/1/ui/gfx/screen_win_unittest.cc#newcode161 ui/gfx/screen_win_unittest.cc:161: }; On 2016/01/29 01:44:40, robliao wrote: > On 2016/01/28 ...
4 years, 10 months ago (2016-02-01 19:07:37 UTC) #22
robliao
https://codereview.chromium.org/1639623003/diff/1/ui/gfx/screen_win_unittest.cc File ui/gfx/screen_win_unittest.cc (right): https://codereview.chromium.org/1639623003/diff/1/ui/gfx/screen_win_unittest.cc#newcode161 ui/gfx/screen_win_unittest.cc:161: }; On 2016/02/01 19:07:37, oshima wrote: > On 2016/01/29 ...
4 years, 10 months ago (2016-02-01 21:35:05 UTC) #25
oshima
lgtm with nits and minor q https://codereview.chromium.org/1639623003/diff/1/ui/gfx/screen_win_unittest.cc File ui/gfx/screen_win_unittest.cc (right): https://codereview.chromium.org/1639623003/diff/1/ui/gfx/screen_win_unittest.cc#newcode161 ui/gfx/screen_win_unittest.cc:161: }; On 2016/02/01 ...
4 years, 10 months ago (2016-02-01 22:15:44 UTC) #26
robliao
https://codereview.chromium.org/1639623003/diff/1/ui/gfx/screen_win_unittest.cc File ui/gfx/screen_win_unittest.cc (right): https://codereview.chromium.org/1639623003/diff/1/ui/gfx/screen_win_unittest.cc#newcode205 ui/gfx/screen_win_unittest.cc:205: scoped_ptr<ScreenWin> screen_win_; On 2016/02/01 22:15:44, oshima wrote: > it ...
4 years, 10 months ago (2016-02-01 22:45:50 UTC) #27
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1639623003/180001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1639623003/180001
4 years, 10 months ago (2016-02-01 23:42:00 UTC) #29
robliao
sky: Please provide owner approval for ui/gfx/... . Thanks!
4 years, 10 months ago (2016-02-02 00:52:49 UTC) #31
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 10 months ago (2016-02-02 01:01:37 UTC) #33
sky
https://codereview.chromium.org/1639623003/diff/180001/ui/gfx/win/display_manager.h File ui/gfx/win/display_manager.h (right): https://codereview.chromium.org/1639623003/diff/180001/ui/gfx/win/display_manager.h#newcode34 ui/gfx/win/display_manager.h:34: class GFX_EXPORT DisplayManager { Why do we need both ...
4 years, 10 months ago (2016-02-02 16:18:20 UTC) #34
robliao
https://codereview.chromium.org/1639623003/diff/180001/ui/gfx/win/display_manager.h File ui/gfx/win/display_manager.h (right): https://codereview.chromium.org/1639623003/diff/180001/ui/gfx/win/display_manager.h#newcode34 ui/gfx/win/display_manager.h:34: class GFX_EXPORT DisplayManager { On 2016/02/02 16:18:20, sky wrote: ...
4 years, 10 months ago (2016-02-02 18:08:07 UTC) #35
sky
On Tue, Feb 2, 2016 at 10:08 AM, <robliao@chromium.org> wrote: > > > https://codereview.chromium.org/1639623003/diff/180001/ui/gfx/win/display_manager.h > ...
4 years, 10 months ago (2016-02-02 18:22:07 UTC) #36
robliao
On 2016/02/02 18:22:07, sky wrote: > On Tue, Feb 2, 2016 at 10:08 AM, <mailto:robliao@chromium.org> ...
4 years, 10 months ago (2016-02-02 19:01:24 UTC) #37
sky
On Tue, Feb 2, 2016 at 11:01 AM, <robliao@chromium.org> wrote: > On 2016/02/02 18:22:07, sky ...
4 years, 10 months ago (2016-02-02 20:29:48 UTC) #38
sky
On 2016/02/02 20:29:48, sky wrote: > On Tue, Feb 2, 2016 at 11:01 AM, <mailto:robliao@chromium.org> ...
4 years, 10 months ago (2016-02-02 20:48:52 UTC) #39
robliao
On 2016/02/02 20:48:52, sky wrote: > On 2016/02/02 20:29:48, sky wrote: > > On Tue, ...
4 years, 10 months ago (2016-02-02 20:53:10 UTC) #40
robliao
On 2016/02/02 20:53:10, robliao wrote: > On 2016/02/02 20:48:52, sky wrote: > > On 2016/02/02 ...
4 years, 10 months ago (2016-02-02 23:54:43 UTC) #41
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1639623003/220001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1639623003/220001
4 years, 10 months ago (2016-02-03 18:14:12 UTC) #44
robliao
(1) and (2) on the above list are small enough to go into the future ...
4 years, 10 months ago (2016-02-03 18:14:50 UTC) #45
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 10 months ago (2016-02-03 19:36:27 UTC) #47
sky
https://codereview.chromium.org/1639623003/diff/220001/ui/gfx/screen_win.cc File ui/gfx/screen_win.cc (right): https://codereview.chromium.org/1639623003/diff/220001/ui/gfx/screen_win.cc#newcode217 ui/gfx/screen_win.cc:217: MONITORINFOEX monitor_info = MonitorInfoFromWindow(NULL, nullptr https://codereview.chromium.org/1639623003/diff/220001/ui/gfx/screen_win.cc#newcode235 ui/gfx/screen_win.cc:235: // When ...
4 years, 10 months ago (2016-02-03 21:47:38 UTC) #48
robliao
https://codereview.chromium.org/1639623003/diff/220001/ui/gfx/screen_win.cc File ui/gfx/screen_win.cc (right): https://codereview.chromium.org/1639623003/diff/220001/ui/gfx/screen_win.cc#newcode217 ui/gfx/screen_win.cc:217: MONITORINFOEX monitor_info = MonitorInfoFromWindow(NULL, On 2016/02/03 21:47:37, sky wrote: ...
4 years, 10 months ago (2016-02-03 22:47:20 UTC) #50
robliao
https://codereview.chromium.org/1639623003/diff/220001/ui/gfx/win/screen_win_display.h File ui/gfx/win/screen_win_display.h (right): https://codereview.chromium.org/1639623003/diff/220001/ui/gfx/win/screen_win_display.h#newcode20 ui/gfx/win/screen_win_display.h:20: class ScreenWinDisplay final { On 2016/02/03 22:47:20, robliao wrote: ...
4 years, 10 months ago (2016-02-04 01:11:30 UTC) #51
robliao
https://codereview.chromium.org/1639623003/diff/220001/ui/gfx/win/screen_win_display.h File ui/gfx/win/screen_win_display.h (right): https://codereview.chromium.org/1639623003/diff/220001/ui/gfx/win/screen_win_display.h#newcode20 ui/gfx/win/screen_win_display.h:20: class ScreenWinDisplay final { On 2016/02/04 01:11:30, robliao wrote: ...
4 years, 10 months ago (2016-02-04 01:42:52 UTC) #52
sky
LGTM
4 years, 10 months ago (2016-02-04 03:10:29 UTC) #53
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1639623003/280001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1639623003/280001
4 years, 10 months ago (2016-02-04 18:03:41 UTC) #56
commit-bot: I haz the power
Committed patchset #9 (id:280001)
4 years, 10 months ago (2016-02-04 19:22:02 UTC) #60
commit-bot: I haz the power
Patchset 9 (id:??) landed as https://crrev.com/663b48643605198c21bfb8b8f81968223833021f Cr-Commit-Position: refs/heads/master@{#373582}
4 years, 10 months ago (2016-02-04 19:23:47 UTC) #62
robliao
A revert of this CL (patchset #9 id:280001) has been created in https://codereview.chromium.org/1674433002/ by robliao@chromium.org. ...
4 years, 10 months ago (2016-02-04 23:01:22 UTC) #63
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1639623003/320001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1639623003/320001
4 years, 10 months ago (2016-02-05 00:26:04 UTC) #67
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1639623003/340001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1639623003/340001
4 years, 10 months ago (2016-02-05 00:46:09 UTC) #70
robliao
In light of the VS2015 find, I've switch DisplayInfo and ScreenWinDisplay back to being class ...
4 years, 10 months ago (2016-02-05 01:37:55 UTC) #71
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 10 months ago (2016-02-05 01:58:45 UTC) #73
sky
Remind me why you need the extra level of immutability? On Thu, Feb 4, 2016 ...
4 years, 10 months ago (2016-02-05 04:55:00 UTC) #74
robliao
On 2016/02/05 04:55:00, sky wrote: > Remind me why you need the extra level of ...
4 years, 10 months ago (2016-02-05 17:57:26 UTC) #75
sky
LGTM - I think what you have is overkill, but I'm fine with it.
4 years, 10 months ago (2016-02-08 17:03:22 UTC) #76
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1639623003/340001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1639623003/340001
4 years, 10 months ago (2016-02-08 17:58:15 UTC) #78
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: linux_android_rel_ng on tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/linux_android_rel_ng/builds/19830)
4 years, 10 months ago (2016-02-08 19:27:06 UTC) #80
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1639623003/340001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1639623003/340001
4 years, 10 months ago (2016-02-08 21:13:30 UTC) #83
commit-bot: I haz the power
Committed patchset #10 (id:340001)
4 years, 10 months ago (2016-02-08 23:09:10 UTC) #85
commit-bot: I haz the power
Patchset 10 (id:??) landed as https://crrev.com/eb17ae163b2ba4a2a67cd88a25b349249ed63f71 Cr-Commit-Position: refs/heads/master@{#374208}
4 years, 10 months ago (2016-02-08 23:10:48 UTC) #87
Nico
4 years, 10 months ago (2016-02-09 02:46:18 UTC) #89
Message was sent while issue was closed.
https://build.chromium.org/p/chromium.fyi/builders/CrWinClang/builds/6039/ste...

..\..\ui\gfx\win\display_info.cc(50,7) :  error: field 'screen_work_rect_' will
be initialized after field 'rotation_' [-Werror,-Wreorder]
      screen_work_rect_(monitor_info.rcWork),
      ^

I'll send you a CL.

Powered by Google App Engine
This is Rietveld 408576698