| OLD | NEW |
| 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/chromeos/accessibility/magnification_manager.h" | 5 #include "chrome/browser/chromeos/accessibility/magnification_manager.h" |
| 6 | 6 |
| 7 #include <limits> | 7 #include <limits> |
| 8 | 8 |
| 9 #include "ash/magnifier/magnification_controller.h" | 9 #include "ash/magnifier/magnification_controller.h" |
| 10 #include "ash/magnifier/partial_magnification_controller.h" | 10 #include "ash/magnifier/partial_magnification_controller.h" |
| (...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 192 SetMagnifierTypeInternal(type); | 192 SetMagnifierTypeInternal(type); |
| 193 SetMagnifierEnabledInternal(enabled); | 193 SetMagnifierEnabledInternal(enabled); |
| 194 } | 194 } |
| 195 | 195 |
| 196 AccessibilityStatusEventDetails details( | 196 AccessibilityStatusEventDetails details( |
| 197 enabled_, type_, ash::A11Y_NOTIFICATION_NONE); | 197 enabled_, type_, ash::A11Y_NOTIFICATION_NONE); |
| 198 content::NotificationService::current()->Notify( | 198 content::NotificationService::current()->Notify( |
| 199 chrome::NOTIFICATION_CROS_ACCESSIBILITY_TOGGLE_SCREEN_MAGNIFIER, | 199 chrome::NOTIFICATION_CROS_ACCESSIBILITY_TOGGLE_SCREEN_MAGNIFIER, |
| 200 content::NotificationService::AllSources(), | 200 content::NotificationService::AllSources(), |
| 201 content::Details<AccessibilityStatusEventDetails>(&details)); | 201 content::Details<AccessibilityStatusEventDetails>(&details)); |
| 202 |
| 203 #if defined(OS_CHROMEOS) |
| 204 if (ash::Shell::GetInstance() && AccessibilityManager::Get()) { |
| 205 ash::Shell::GetInstance()->SetCursorCompositingEnabled( |
| 206 AccessibilityManager::Get()->ShouldEnableCursorCompositing()); |
| 207 } |
| 208 #endif |
| 202 } | 209 } |
| 203 | 210 |
| 204 // content::NotificationObserver implementation: | 211 // content::NotificationObserver implementation: |
| 205 virtual void Observe(int type, | 212 virtual void Observe(int type, |
| 206 const content::NotificationSource& source, | 213 const content::NotificationSource& source, |
| 207 const content::NotificationDetails& details) OVERRIDE { | 214 const content::NotificationDetails& details) OVERRIDE { |
| 208 switch (type) { | 215 switch (type) { |
| 209 case chrome::NOTIFICATION_LOGIN_OR_LOCK_WEBUI_VISIBLE: { | 216 case chrome::NOTIFICATION_LOGIN_OR_LOCK_WEBUI_VISIBLE: { |
| 210 // Update |profile_| when entering the login screen. | 217 // Update |profile_| when entering the login screen. |
| 211 Profile* profile = ProfileManager::GetActiveUserProfile(); | 218 Profile* profile = ProfileManager::GetActiveUserProfile(); |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 261 delete g_magnification_manager; | 268 delete g_magnification_manager; |
| 262 g_magnification_manager = NULL; | 269 g_magnification_manager = NULL; |
| 263 } | 270 } |
| 264 | 271 |
| 265 // static | 272 // static |
| 266 MagnificationManager* MagnificationManager::Get() { | 273 MagnificationManager* MagnificationManager::Get() { |
| 267 return g_magnification_manager; | 274 return g_magnification_manager; |
| 268 } | 275 } |
| 269 | 276 |
| 270 } // namespace chromeos | 277 } // namespace chromeos |
| OLD | NEW |