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

Side by Side Diff: chrome/browser/chromeos/accessibility/magnification_manager.cc

Issue 150403005: Chrome OS Accessibility: enable cursor compositing when screen magnifier is enabled. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Do not forward synthesized MOUSE_MOVED/DRAGGED events to CursorWindowController. Created 6 years, 10 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
« no previous file with comments | « chrome/browser/chromeos/accessibility/accessibility_manager.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/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
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
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
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/accessibility/accessibility_manager.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698