| Index: chrome/browser/extensions/display_info_provider_chromeos.cc
|
| diff --git a/chrome/browser/extensions/display_info_provider_chromeos.cc b/chrome/browser/extensions/display_info_provider_chromeos.cc
|
| index c38b0abb675e7e7fb91066e10b93a77ace680554..0901b4265efd14ed4cb23497ea4850f037d0fe88 100644
|
| --- a/chrome/browser/extensions/display_info_provider_chromeos.cc
|
| +++ b/chrome/browser/extensions/display_info_provider_chromeos.cc
|
| @@ -25,8 +25,6 @@ using core_api::system_display::Insets;
|
|
|
| namespace {
|
|
|
| -// TODO(hshi): determine the DPI of the screen.
|
| -const float kDpi96 = 96.0;
|
| // Maximum allowed bounds origin absolute value.
|
| const int kMaxBoundsOrigin = 200 * 1000;
|
|
|
| @@ -360,6 +358,9 @@ bool DisplayInfoProviderChromeOS::SetInfo(const std::string& display_id_str,
|
| void DisplayInfoProviderChromeOS::UpdateDisplayUnitInfoForPlatform(
|
| const gfx::Display& display,
|
| extensions::core_api::system_display::DisplayUnitInfo* unit) {
|
| +#if !defined(USE_ATHENA)
|
| + // TODO(dpolukhin): put something reasonable to the unit without ash::Shell.
|
| + // crbug.com/416961
|
| ash::DisplayManager* display_manager =
|
| ash::Shell::GetInstance()->display_manager();
|
| unit->name = display_manager->GetDisplayNameForId(display.id());
|
| @@ -368,6 +369,9 @@ void DisplayInfoProviderChromeOS::UpdateDisplayUnitInfoForPlatform(
|
| base::Int64ToString(display_manager->mirrored_display_id());
|
| }
|
|
|
| + // TODO(hshi): determine the DPI of the screen.
|
| + const float kDpi96 = 96.0;
|
| +
|
| const float dpi = display.device_scale_factor() * kDpi96;
|
| unit->dpi_x = dpi;
|
| unit->dpi_y = dpi;
|
| @@ -378,6 +382,7 @@ void DisplayInfoProviderChromeOS::UpdateDisplayUnitInfoForPlatform(
|
| unit->overscan.top = overscan_insets.top();
|
| unit->overscan.right = overscan_insets.right();
|
| unit->overscan.bottom = overscan_insets.bottom();
|
| +#endif
|
| }
|
|
|
| gfx::Screen* DisplayInfoProviderChromeOS::GetActiveScreen() {
|
|
|