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

Side by Side Diff: chrome/browser/chrome_browser_application_mac.mm

Issue 9939011: Add an accessibility mode for editable text fields only. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addressed comments and rebased. Created 8 years, 8 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 #import "chrome/browser/chrome_browser_application_mac.h" 5 #import "chrome/browser/chrome_browser_application_mac.h"
6 6
7 #import "base/auto_reset.h" 7 #import "base/auto_reset.h"
8 #import "base/logging.h" 8 #import "base/logging.h"
9 #include "base/mac/crash_logging.h" 9 #include "base/mac/crash_logging.h"
10 #import "base/mac/scoped_nsexception_enabler.h" 10 #import "base/mac/scoped_nsexception_enabler.h"
(...skipping 487 matching lines...) Expand 10 before | Expand all | Expand 10 after
498 - (void)accessibilitySetValue:(id)value forAttribute:(NSString*)attribute { 498 - (void)accessibilitySetValue:(id)value forAttribute:(NSString*)attribute {
499 if ([attribute isEqualToString:@"AXEnhancedUserInterface"] && 499 if ([attribute isEqualToString:@"AXEnhancedUserInterface"] &&
500 [value intValue] == 1) { 500 [value intValue] == 1) {
501 BrowserAccessibilityState::GetInstance()->OnScreenReaderDetected(); 501 BrowserAccessibilityState::GetInstance()->OnScreenReaderDetected();
502 for (TabContentsIterator it; 502 for (TabContentsIterator it;
503 !it.done(); 503 !it.done();
504 ++it) { 504 ++it) {
505 if (TabContentsWrapper* contents = *it) { 505 if (TabContentsWrapper* contents = *it) {
506 if (content::RenderViewHost* rvh = 506 if (content::RenderViewHost* rvh =
507 contents->web_contents()->GetRenderViewHost()) { 507 contents->web_contents()->GetRenderViewHost()) {
508 rvh->EnableRendererAccessibility(); 508 rvh->EnableFullAccessibilityMode();
509 } 509 }
510 } 510 }
511 } 511 }
512 } 512 }
513 return [super accessibilitySetValue:value forAttribute:attribute]; 513 return [super accessibilitySetValue:value forAttribute:attribute];
514 } 514 }
515 515
516 - (void)_cycleWindowsReversed:(BOOL)arg1 { 516 - (void)_cycleWindowsReversed:(BOOL)arg1 {
517 AutoReset<BOOL> pin(&cyclingWindows_, YES); 517 AutoReset<BOOL> pin(&cyclingWindows_, YES);
518 [super _cycleWindowsReversed:arg1]; 518 [super _cycleWindowsReversed:arg1];
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
571 std::vector<NSWindow*>::iterator window_iterator = 571 std::vector<NSWindow*>::iterator window_iterator =
572 std::find(previousKeyWindows_.begin(), 572 std::find(previousKeyWindows_.begin(),
573 previousKeyWindows_.end(), 573 previousKeyWindows_.end(),
574 window); 574 window);
575 if (window_iterator != previousKeyWindows_.end()) { 575 if (window_iterator != previousKeyWindows_.end()) {
576 previousKeyWindows_.erase(window_iterator); 576 previousKeyWindows_.erase(window_iterator);
577 } 577 }
578 } 578 }
579 579
580 @end 580 @end
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698