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

Side by Side Diff: content/browser/accessibility/browser_accessibility_cocoa.mm

Issue 799633007: Make Windows accessibility event firing aware of guest / child frames. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@webview_fixes
Patch Set: Fix Mac compile Created 5 years, 11 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
« no previous file with comments | « no previous file | content/browser/accessibility/browser_accessibility_manager.h » ('j') | 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 <execinfo.h> 5 #include <execinfo.h>
6 6
7 #import "content/browser/accessibility/browser_accessibility_cocoa.h" 7 #import "content/browser/accessibility/browser_accessibility_cocoa.h"
8 8
9 #include <map> 9 #include <map>
10 10
(...skipping 519 matching lines...) Expand 10 before | Expand all | Expand 10 after
530 nil; 530 nil;
531 } 531 }
532 532
533 - (NSPoint)pointInScreen:(NSPoint)origin 533 - (NSPoint)pointInScreen:(NSPoint)origin
534 size:(NSSize)size { 534 size:(NSSize)size {
535 if (!browserAccessibility_) 535 if (!browserAccessibility_)
536 return NSZeroPoint; 536 return NSZeroPoint;
537 537
538 // Get the delegate for the topmost BrowserAccessibilityManager, because 538 // Get the delegate for the topmost BrowserAccessibilityManager, because
539 // that's the only one that can convert points to their origin in the screen. 539 // that's the only one that can convert points to their origin in the screen.
540 BrowserAccessibilityManager* manager = browserAccessibility_->manager(); 540 BrowserAccessibilityDelegate* delegate =
541 BrowserAccessibility* root = manager->GetRoot(); 541 browserAccessibility_->manager()->GetDelegateFromRootManager();
542 while (root->GetParent())
543 root = root->GetParent()->manager()->GetRoot();
544 manager = root->manager();
545 BrowserAccessibilityDelegate* delegate = manager->delegate();
546
547 if (delegate) { 542 if (delegate) {
548 gfx::Rect bounds(origin.x, origin.y, size.width, size.height); 543 gfx::Rect bounds(origin.x, origin.y, size.width, size.height);
549 gfx::Point point = delegate->AccessibilityOriginInScreen(bounds); 544 gfx::Point point = delegate->AccessibilityOriginInScreen(bounds);
550 return NSMakePoint(point.x(), point.y()); 545 return NSMakePoint(point.x(), point.y());
551 } else { 546 } else {
552 return NSZeroPoint; 547 return NSZeroPoint;
553 } 548 }
554 } 549 }
555 550
556 // Returns a string indicating the NSAccessibility role of this object. 551 // Returns a string indicating the NSAccessibility role of this object.
(...skipping 1008 matching lines...) Expand 10 before | Expand all | Expand 10 after
1565 if (!browserAccessibility_) 1560 if (!browserAccessibility_)
1566 return [super hash]; 1561 return [super hash];
1567 return browserAccessibility_->GetId(); 1562 return browserAccessibility_->GetId();
1568 } 1563 }
1569 1564
1570 - (BOOL)accessibilityShouldUseUniqueId { 1565 - (BOOL)accessibilityShouldUseUniqueId {
1571 return YES; 1566 return YES;
1572 } 1567 }
1573 1568
1574 @end 1569 @end
1575
OLDNEW
« no previous file with comments | « no previous file | content/browser/accessibility/browser_accessibility_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698