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

Unified Diff: ash/magnifier/magnification_controller.cc

Issue 11280287: Magnifier: Prevent useless operation in enabling/disabling magnifier. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: fix test failure (MagnificationManagerTest.ChangeMagnifierType) 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 | chrome/browser/chromeos/accessibility/accessibility_util.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 d2169b320e0a88530ee0baf6b7399ea91fe48224..1cbc56a2a60b0e5ca2079c0f3e24f342007e8a0d 100644
--- a/ash/magnifier/magnification_controller.cc
+++ b/ash/magnifier/magnification_controller.cc
@@ -472,6 +472,9 @@ void MagnificationControllerImpl::EnsurePointIsVisible(
}
void MagnificationControllerImpl::SetEnabled(bool enabled) {
+ if (enabled == is_enabled_)
+ return;
+
if (enabled) {
float scale =
ash::Shell::GetInstance()->delegate()->GetSavedScreenMagnifierScale();
« no previous file with comments | « no previous file | chrome/browser/chromeos/accessibility/accessibility_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698