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

Side by Side Diff: chrome/browser/ui/ash/ash_init.cc

Issue 11642014: Re-introduce the partial magnifier (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix the build failure on win_aura Created 7 years, 11 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/ui/ash/ash_init.h" 5 #include "chrome/browser/ui/ash/ash_init.h"
6 6
7 #include "ash/accelerators/accelerator_controller.h" 7 #include "ash/accelerators/accelerator_controller.h"
8 #include "ash/ash_switches.h" 8 #include "ash/ash_switches.h"
9 #include "ash/high_contrast/high_contrast_controller.h" 9 #include "ash/high_contrast/high_contrast_controller.h"
10 #include "ash/magnifier/magnification_controller.h" 10 #include "ash/magnifier/magnification_controller.h"
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 #if defined(OS_CHROMEOS) 89 #if defined(OS_CHROMEOS)
90 shell->accelerator_controller()->SetBrightnessControlDelegate( 90 shell->accelerator_controller()->SetBrightnessControlDelegate(
91 scoped_ptr<ash::BrightnessControlDelegate>( 91 scoped_ptr<ash::BrightnessControlDelegate>(
92 new BrightnessController).Pass()); 92 new BrightnessController).Pass());
93 shell->accelerator_controller()->SetImeControlDelegate( 93 shell->accelerator_controller()->SetImeControlDelegate(
94 scoped_ptr<ash::ImeControlDelegate>(new ImeController).Pass()); 94 scoped_ptr<ash::ImeControlDelegate>(new ImeController).Pass());
95 ash::Shell::GetInstance()->high_contrast_controller()->SetEnabled( 95 ash::Shell::GetInstance()->high_contrast_controller()->SetEnabled(
96 chromeos::accessibility::IsHighContrastEnabled()); 96 chromeos::accessibility::IsHighContrastEnabled());
97 97
98 DCHECK(chromeos::MagnificationManager::Get()); 98 DCHECK(chromeos::MagnificationManager::Get());
99 bool magnifier_enabled =
100 chromeos::MagnificationManager::Get()->IsMagnifierEnabled();
99 ash::MagnifierType magnifier_type = 101 ash::MagnifierType magnifier_type =
100 chromeos::MagnificationManager::Get()->GetMagnifierType(); 102 chromeos::MagnificationManager::Get()->GetMagnifierType();
101 ash::Shell::GetInstance()->magnification_controller()->SetEnabled( 103 ash::Shell::GetInstance()->magnification_controller()->
102 magnifier_type == ash::MAGNIFIER_FULL); 104 SetEnabled(magnifier_enabled && magnifier_type == ash::MAGNIFIER_FULL);
103 ash::Shell::GetInstance()->partial_magnification_controller()->SetEnabled( 105 ash::Shell::GetInstance()->partial_magnification_controller()->
104 magnifier_type == ash::MAGNIFIER_PARTIAL); 106 SetEnabled(magnifier_enabled && magnifier_type == ash::MAGNIFIER_PARTIAL);
105 107
106 if (!CommandLine::ForCurrentProcess()->HasSwitch( 108 if (!CommandLine::ForCurrentProcess()->HasSwitch(
107 switches::kDisableZeroBrowsersOpenForTests)) { 109 switches::kDisableZeroBrowsersOpenForTests)) {
108 browser::StartKeepAlive(); 110 browser::StartKeepAlive();
109 } 111 }
110 #endif 112 #endif
111 ash::Shell::GetPrimaryRootWindow()->ShowRootWindow(); 113 ash::Shell::GetPrimaryRootWindow()->ShowRootWindow();
112 } 114 }
113 115
114 void CloseAsh() { 116 void CloseAsh() {
115 if (ash::Shell::HasInstance()) 117 if (ash::Shell::HasInstance())
116 ash::Shell::DeleteInstance(); 118 ash::Shell::DeleteInstance();
117 } 119 }
118 120
119 } // namespace chrome 121 } // namespace chrome
OLDNEW
« no previous file with comments | « chrome/browser/resources/options/browser_options.html ('k') | chrome/browser/ui/ash/chrome_shell_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698