Chromium Code Reviews| Index: ash/display/display_change_observer_chromeos.cc |
| diff --git a/ash/display/display_change_observer_chromeos.cc b/ash/display/display_change_observer_chromeos.cc |
| index 71bdfcd2d106d61c99eaadb344673a50909ef16f..25d53fddac443e3efa0ac08a8b129b6536718060 100644 |
| --- a/ash/display/display_change_observer_chromeos.cc |
| +++ b/ash/display/display_change_observer_chromeos.cc |
| @@ -19,6 +19,7 @@ |
| #include "chromeos/display/output_util.h" |
| #include "grit/ash_strings.h" |
| #include "ui/base/l10n/l10n_util.h" |
| +#include "ui/base/x/x11_util.h" |
| #include "ui/compositor/dip_util.h" |
| #include "ui/gfx/display.h" |
| @@ -36,16 +37,6 @@ const unsigned int kHighDensityDPIThreshold = 160; |
| // 1 inch in mm. |
| const float kInchInMm = 25.4f; |
| -// A list of bogus sizes in mm that X detects that should be ignored. |
| -// See crbug.com/136533. The first element maintains the minimum |
| -// size required to be valid size. |
| -const unsigned long kInvalidDisplaySizeList[][2] = { |
| - {40, 30}, |
| - {50, 40}, |
| - {160, 90}, |
| - {160, 100}, |
| -}; |
| - |
| // Resolution list are sorted by the area in pixels and the larger |
| // one comes first. |
| struct ResolutionSorter { |
| @@ -59,21 +50,7 @@ struct ResolutionSorter { |
| // static |
| bool DisplayChangeObserver::ShouldIgnoreSize(unsigned long mm_width, |
|
Daniel Erat
2013/10/29 14:28:25
please remove this method and make the caller call
Mikhail
2013/10/29 14:50:55
Actually I was planning to make it as a separate C
|
| unsigned long mm_height) { |
| - // Ignore if the reported display is smaller than minimum size. |
| - if (mm_width <= kInvalidDisplaySizeList[0][0] || |
| - mm_height <= kInvalidDisplaySizeList[0][1]) { |
| - LOG(WARNING) << "Smaller than minimum display size"; |
| - return true; |
| - } |
| - for (unsigned long i = 1 ; i < arraysize(kInvalidDisplaySizeList); ++i) { |
| - const unsigned long* size = kInvalidDisplaySizeList[i]; |
| - if (mm_width == size[0] && mm_height == size[1]) { |
| - LOG(WARNING) << "Black listed display size detected:" |
| - << size[0] << "x" << size[1]; |
| - return true; |
| - } |
| - } |
| - return false; |
| + return ui::IsXDisplaySizeBlackListed(mm_width, mm_height); |
| } |
| // static |