DescriptionMagnifier: 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) #Messages
Total messages: 13 (0 generated)
|