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

Unified Diff: ash/magnifier/magnification_controller.cc

Issue 11442036: Magnifier: Change the login-screen default scale from 1.0x to 2.0x (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: add TODO comment Created 8 years 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 | « no previous file | ash/system/tray_accessibility.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/magnifier/magnification_controller.cc
diff --git a/ash/magnifier/magnification_controller.cc b/ash/magnifier/magnification_controller.cc
index 22f50de127e96c37831f1a3dbfe6047c641b25a6..b7e90c13b555dd6ae6b19396fe693654a150b141 100644
--- a/ash/magnifier/magnification_controller.cc
+++ b/ash/magnifier/magnification_controller.cc
@@ -105,21 +105,6 @@ class MagnificationControllerImpl : virtual public MagnificationController,
// Returns if the magnification scale is 1.0 or not (larger then 1.0).
bool IsMagnified() const;
- // Returns the default scale which depends on the login status.
- float GetDefaultZoomScale() const {
- // TODO(yoshiki,mazda): Do not use SystemTrayDelegate to get the user login
- // status (http://crbug.com/163170).
- user::LoginStatus login = Shell::GetInstance()->tray_delegate() ?
- Shell::GetInstance()->tray_delegate()->GetUserLoginStatus() :
- user::LOGGED_IN_NONE;
-
- // On login screen, don't magnify the screen by default.
- if (login == user::LOGGED_IN_NONE)
- return kNonMagnifiedScale;
-
- return kInitialMagnifiedScale;
- }
-
// Returns the rect of the magnification window.
gfx::RectF GetWindowRectDIP(float scale) const;
// Returns the size of the root window.
@@ -476,7 +461,7 @@ void MagnificationControllerImpl::SetEnabled(bool enabled) {
float scale =
ash::Shell::GetInstance()->delegate()->GetSavedScreenMagnifierScale();
if (scale <= 0.0f)
- scale = GetDefaultZoomScale();
+ scale = kInitialMagnifiedScale;
ValidateScale(&scale);
// Do nothing, if already enabled with same scale.
@@ -484,6 +469,7 @@ void MagnificationControllerImpl::SetEnabled(bool enabled) {
return;
RedrawKeepingMousePosition(scale, true);
+ ash::Shell::GetInstance()->delegate()->SaveScreenMagnifierScale(scale);
is_enabled_ = enabled;
} else {
// Do nothing, if already disabled.
« no previous file with comments | « no previous file | ash/system/tray_accessibility.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698