This source file includes following definitions.
- IsDisplaySizeBlackListed
#include "ui/display/display_util.h"
#include "base/logging.h"
namespace ui {
namespace {
const int kInvalidDisplaySizeList[][2] = {
{40, 30},
{50, 40},
{160, 90},
{160, 100},
};
}
bool IsDisplaySizeBlackListed(const gfx::Size& physical_size) {
if (physical_size.width() <= kInvalidDisplaySizeList[0][0] ||
physical_size.height() <= kInvalidDisplaySizeList[0][1]) {
LOG(WARNING) << "Smaller than minimum display size";
return true;
}
for (size_t i = 1; i < arraysize(kInvalidDisplaySizeList); ++i) {
const gfx::Size size(kInvalidDisplaySizeList[i][0],
kInvalidDisplaySizeList[i][1]);
if (physical_size == size) {
LOG(WARNING) << "Black listed display size detected:" << size.ToString();
return true;
}
}
return false;
}
}