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

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

Issue 2949353003: Implement large cursors in Mushrome. (Closed)
Patch Set: rename everything to CursorSize Created 3 years, 5 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
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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/accessibility_manager.h" 5 #include "chrome/browser/chromeos/accessibility/accessibility_manager.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <memory> 10 #include <memory>
(...skipping 402 matching lines...) Expand 10 before | Expand all | Expand 10 after
413 } 413 }
414 414
415 large_cursor_enabled_ = enabled; 415 large_cursor_enabled_ = enabled;
416 large_cursor_size_in_dip_ = large_cursor_size_in_dip; 416 large_cursor_size_in_dip_ = large_cursor_size_in_dip;
417 417
418 AccessibilityStatusEventDetails details(ACCESSIBILITY_TOGGLE_LARGE_CURSOR, 418 AccessibilityStatusEventDetails details(ACCESSIBILITY_TOGGLE_LARGE_CURSOR,
419 enabled, ash::A11Y_NOTIFICATION_NONE); 419 enabled, ash::A11Y_NOTIFICATION_NONE);
420 420
421 NotifyAccessibilityStatusChanged(details); 421 NotifyAccessibilityStatusChanged(details);
422 422
423 ash::Shell::Get()->cursor_manager()->SetCursorSet( 423 ash::Shell::Get()->cursor_manager()->SetCursorSize(
424 enabled ? ui::CURSOR_SET_LARGE : ui::CURSOR_SET_NORMAL); 424 enabled ? ui::CursorSize::kLarge : ui::CursorSize::kNormal);
425 ash::Shell::Get()->SetLargeCursorSizeInDip(large_cursor_size_in_dip); 425 ash::Shell::Get()->SetLargeCursorSizeInDip(large_cursor_size_in_dip);
426 ash::Shell::Get()->SetCursorCompositingEnabled( 426 ash::Shell::Get()->SetCursorCompositingEnabled(
427 ShouldEnableCursorCompositing()); 427 ShouldEnableCursorCompositing());
428 } 428 }
429 429
430 bool AccessibilityManager::IsIncognitoAllowed() { 430 bool AccessibilityManager::IsIncognitoAllowed() {
431 return profile_ != NULL && 431 return profile_ != NULL &&
432 profile_->GetProfileType() != Profile::GUEST_PROFILE && 432 profile_->GetProfileType() != Profile::GUEST_PROFILE &&
433 IncognitoModePrefs::GetAvailability(profile_->GetPrefs()) != 433 IncognitoModePrefs::GetAvailability(profile_->GetPrefs()) !=
434 IncognitoModePrefs::DISABLED; 434 IncognitoModePrefs::DISABLED;
(...skipping 1096 matching lines...) Expand 10 before | Expand all | Expand 10 after
1531 if (!extension_registry_observer_.IsObserving(registry) && !id.empty()) 1531 if (!extension_registry_observer_.IsObserving(registry) && !id.empty())
1532 extension_registry_observer_.Add(registry); 1532 extension_registry_observer_.Add(registry);
1533 } 1533 }
1534 1534
1535 void AccessibilityManager::SetSwitchAccessKeys(const std::set<int>& key_codes) { 1535 void AccessibilityManager::SetSwitchAccessKeys(const std::set<int>& key_codes) {
1536 if (switch_access_enabled_) 1536 if (switch_access_enabled_)
1537 switch_access_event_handler_->SetKeysToCapture(key_codes); 1537 switch_access_event_handler_->SetKeysToCapture(key_codes);
1538 } 1538 }
1539 1539
1540 } // namespace chromeos 1540 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698