| 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 176 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 187 | 187 |
| 188 if (!enabled) { | 188 if (!enabled) { |
| 189 SetMagnifierEnabledInternal(enabled); | 189 SetMagnifierEnabledInternal(enabled); |
| 190 SetMagnifierTypeInternal(type); | 190 SetMagnifierTypeInternal(type); |
| 191 } else { | 191 } else { |
| 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 ACCESSIBILITY_TOGGLE_SCREEN_MAGNIFIER, |
| 198 content::NotificationService::current()->Notify( | 198 enabled_, |
| 199 chrome::NOTIFICATION_CROS_ACCESSIBILITY_TOGGLE_SCREEN_MAGNIFIER, | 199 type_, |
| 200 content::NotificationService::AllSources(), | 200 ash::A11Y_NOTIFICATION_NONE); |
| 201 content::Details<AccessibilityStatusEventDetails>(&details)); | 201 |
| 202 AccessibilityManager::Get()->NotifyAccessibilityStatusChanged(details); |
| 202 | 203 |
| 203 #if defined(OS_CHROMEOS) | 204 #if defined(OS_CHROMEOS) |
| 204 if (ash::Shell::GetInstance() && AccessibilityManager::Get()) { | 205 if (ash::Shell::GetInstance() && AccessibilityManager::Get()) { |
| 205 ash::Shell::GetInstance()->SetCursorCompositingEnabled( | 206 ash::Shell::GetInstance()->SetCursorCompositingEnabled( |
| 206 AccessibilityManager::Get()->ShouldEnableCursorCompositing()); | 207 AccessibilityManager::Get()->ShouldEnableCursorCompositing()); |
| 207 } | 208 } |
| 208 #endif | 209 #endif |
| 209 } | 210 } |
| 210 | 211 |
| 211 // content::NotificationObserver implementation: | 212 // content::NotificationObserver implementation: |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 268 delete g_magnification_manager; | 269 delete g_magnification_manager; |
| 269 g_magnification_manager = NULL; | 270 g_magnification_manager = NULL; |
| 270 } | 271 } |
| 271 | 272 |
| 272 // static | 273 // static |
| 273 MagnificationManager* MagnificationManager::Get() { | 274 MagnificationManager* MagnificationManager::Get() { |
| 274 return g_magnification_manager; | 275 return g_magnification_manager; |
| 275 } | 276 } |
| 276 | 277 |
| 277 } // namespace chromeos | 278 } // namespace chromeos |
| OLD | NEW |