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

Issue 11280287: Magnifier: Prevent useless operation in enabling/disabling magnifier. (Closed)

Created:
8 years ago by yoshiki
Modified:
8 years ago
CC:
chromium-reviews, dtseng+watch_chromium.org, sadrul, nkostylev+watch_chromium.org, hashimoto+watch_chromium.org, ben+watch_chromium.org, aboxhall+watch_chromium.org, yoshiki+watch_chromium.org, yuzo+watch_chromium.org, davidbarr+watch_chromium.org, dmazzoni+watch_chromium.org, oshima+watch_chromium.org, ctguil+watch_chromium.org, stevenjb+watch_chromium.org, davemoore+watch_chromium.org, zork+watch_chromium.org
Base URL:
http://git.chromium.org/chromium/src.git@master
Visibility:
Public.

Description

Magnifier: Prevent useless operation in enabling/disabling magnifier. On login, although the magnifier is disabled, the manager/controller try to disable it again. This CL prevents this useless operation. Changes: - In MagnificationManager::SetMagnifier(), if the given type is same as the current type, do nothing. - In MagnificationControllerImpl::SetEnabled(), if the given |enabled| is same as current, do nothing. - Use Initialize/Shutdown pattern instead of scoped_ptr in ChromeBrowserMainPartsChromeos. - Initialize in PreProfileInit() instead of PostProfileInit(). - Add MagnificationObserver, and use it instead of watching pref changes. - GetMagnifierType() returns the cached value. BUG=163941 TEST=manual, browser_tests passes Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=171401

Patch Set 1 #

Total comments: 13

Patch Set 2 : rebase #

Patch Set 3 : review fix (#2 & #3) #

Total comments: 1

Patch Set 4 : review fix (#7) #

Patch Set 5 : rebase #

Patch Set 6 : fix test faulure #

Patch Set 7 : fix test failures #

Patch Set 8 : rebase #

Patch Set 9 : fix test failure (MagnificationManagerTest.ChangeMagnifierType) #

Unified diffs Side-by-side diffs Delta from patch set Stats (+174 lines, -62 lines) Patch
M ash/magnifier/magnification_controller.cc View 1 chunk +3 lines, -0 lines 0 comments Download
M chrome/browser/chromeos/accessibility/accessibility_util.cc View 1 2 3 4 2 chunks +4 lines, -4 lines 0 comments Download
M chrome/browser/chromeos/accessibility/magnification_manager.h View 1 2 3 2 chunks +15 lines, -3 lines 0 comments Download
M chrome/browser/chromeos/accessibility/magnification_manager.cc View 1 2 3 4 5 6 7 8 3 chunks +72 lines, -41 lines 0 comments Download
M chrome/browser/chromeos/accessibility/magnification_manager_browsertest.cc View 1 2 3 4 5 6 7 5 chunks +60 lines, -5 lines 0 comments Download
M chrome/browser/chromeos/chrome_browser_main_chromeos.h View 1 chunk +0 lines, -1 line 0 comments Download
M chrome/browser/chromeos/chrome_browser_main_chromeos.cc View 1 2 3 4 5 6 4 chunks +6 lines, -3 lines 0 comments Download
M chrome/browser/chromeos/system/ash_system_tray_delegate.cc View 1 2 6 chunks +14 lines, -5 lines 0 comments Download

Messages

Total messages: 13 (0 generated)
yoshiki
Could you review this? Thanks, @zork: - chrome/browser/chromeos/accessibility/* @derat: - ash/* - chrome/browser/chromeos/* (except accessibility/*)
8 years ago (2012-12-04 00:56:08 UTC) #1
Daniel Erat
https://codereview.chromium.org/11280287/diff/1/chrome/browser/chromeos/accessibility/magnification_manager.cc File chrome/browser/chromeos/accessibility/magnification_manager.cc (right): https://codereview.chromium.org/11280287/diff/1/chrome/browser/chromeos/accessibility/magnification_manager.cc#newcode52 chrome/browser/chromeos/accessibility/magnification_manager.cc:52: return Singleton<MagnificationManagerImpl>::get(); the Singleton template causes more trouble than ...
8 years ago (2012-12-04 01:06:35 UTC) #2
stevenjb
https://codereview.chromium.org/11280287/diff/1/chrome/browser/chromeos/accessibility/magnification_manager.cc File chrome/browser/chromeos/accessibility/magnification_manager.cc (right): https://codereview.chromium.org/11280287/diff/1/chrome/browser/chromeos/accessibility/magnification_manager.cc#newcode52 chrome/browser/chromeos/accessibility/magnification_manager.cc:52: return Singleton<MagnificationManagerImpl>::get(); On 2012/12/04 01:06:36, Daniel Erat wrote: > ...
8 years ago (2012-12-04 01:35:34 UTC) #3
Zachary Kuznia
lgtm after comments are addressed.
8 years ago (2012-12-04 01:45:30 UTC) #4
yoshiki
I've updated the code and the description. PTAL. https://codereview.chromium.org/11280287/diff/1/chrome/browser/chromeos/accessibility/magnification_manager.cc File chrome/browser/chromeos/accessibility/magnification_manager.cc (right): https://codereview.chromium.org/11280287/diff/1/chrome/browser/chromeos/accessibility/magnification_manager.cc#newcode52 chrome/browser/chromeos/accessibility/magnification_manager.cc:52: return ...
8 years ago (2012-12-04 08:30:20 UTC) #5
Daniel Erat
(i'm out today and most of tomorrow, so i'll let steven give review this)
8 years ago (2012-12-04 17:02:33 UTC) #6
stevenjb
lgtm with one change. https://codereview.chromium.org/11280287/diff/12019/chrome/browser/chromeos/accessibility/magnification_manager.h File chrome/browser/chromeos/accessibility/magnification_manager.h (right): https://codereview.chromium.org/11280287/diff/12019/chrome/browser/chromeos/accessibility/magnification_manager.h#newcode29 chrome/browser/chromeos/accessibility/magnification_manager.h:29: virtual ~MagnificationManager() {} protected section ...
8 years ago (2012-12-04 18:06:26 UTC) #7
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/yoshiki@chromium.org/11280287/24002
8 years ago (2012-12-05 06:16:25 UTC) #8
commit-bot: I haz the power
Presubmit check for 11280287-24002 failed and returned exit status 1. Running presubmit commit checks ...
8 years ago (2012-12-05 06:16:29 UTC) #9
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/yoshiki@chromium.org/11280287/24002
8 years ago (2012-12-05 06:19:54 UTC) #10
commit-bot: I haz the power
Retried try job too often on linux_chromeos for step(s) browser_tests
8 years ago (2012-12-05 10:03:38 UTC) #11
Daniel Erat
LGTM for ash/
8 years ago (2012-12-05 20:52:04 UTC) #12
commit-bot: I haz the power
8 years ago (2012-12-05 23:53:17 UTC) #13

Powered by Google App Engine
This is Rietveld 408576698