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

Issue 194098: Implement functions to return the primary display dimensions and the number of displays connected (Closed)

Created:
11 years, 3 months ago by Mark Mentovai
Modified:
9 years, 7 months ago
Reviewers:
Nico
CC:
chromium-reviews_googlegroups.com, John Grabowski, brettw, pam+watch_chromium.org
Visibility:
Public.

Description

Implement functions to return the primary display dimensions and the number of displays connected. BUG=21731 TEST=No more NOTIMPLEMENTED messages for these. Metrics data should have the correct values in log.display. Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=26092

Patch Set 1 #

Patch Set 2 : '' #

Total comments: 2

Patch Set 3 : '' #

Patch Set 4 : '' #

Unified diffs Side-by-side diffs Delta from patch set Stats (+47 lines, -0 lines) Patch
M base/sys_info_posix.cc View 1 2 3 2 chunks +47 lines, -0 lines 0 comments Download

Messages

Total messages: 2 (0 generated)
Mark Mentovai
11 years, 3 months ago (2009-09-13 23:51:41 UTC) #1
Nico
11 years, 3 months ago (2009-09-14 02:06:58 UTC) #2
LG.

As a general remark, it would be nicer if the functions that consist solely of
#if defined(OS_A) #elif defined(OS_B) #endif where defined in sys_info_mac.cc,
sys_info_linux.cc and didn't contain #ifdefs.

http://codereview.chromium.org/194098/diff/1002/1003
File base/sys_info_posix.cc (right):

http://codereview.chromium.org/194098/diff/1002/1003#newcode163
Line 163: // displays exclude sleeping displays, and those are desired in the
count.
That sounds right. Windows uses GetSystemMetrics(SM_CMONITORS), for which MSDN
says "counts only visible display monitors. This is different from
EnumDisplayMonitors, which enumerates both visible display monitors and
invisible pseudo-monitors that are associated with mirroring drivers. An
invisible pseudo-monitor is associated with a pseudo-device used to mirror
application drawing for remoting or other purposes."

(this is justify why I think this is correct, not a comment for you)

http://codereview.chromium.org/194098/diff/1002/1003#newcode168
Line 168: CGDirectDisplayID online_displays[64];
These people would not approve:
http://www.ubergizmo.com/15/archives/2008/11/stallion_the_highest_resolution_...
;-)

Powered by Google App Engine
This is Rietveld 408576698