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

Unified Diff: chrome/browser/extensions/display_info_provider_chromeos.cc

Issue 620663005: Lock screen for Chrome-Athena (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: one more nit Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/chromeos/login/users/wallpaper/wallpaper_manager.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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() {
« no previous file with comments | « chrome/browser/chromeos/login/users/wallpaper/wallpaper_manager.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698