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

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

Issue 2961913002: Fire load complete notifications on Mac even when page loads quickly. (Closed)
Patch Set: 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
« no previous file with comments | « no previous file | 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 "content/browser/accessibility/browser_accessibility_manager_mac.h" 5 #include "content/browser/accessibility/browser_accessibility_manager_mac.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #import "base/mac/mac_util.h" 8 #import "base/mac/mac_util.h"
9 #import "base/mac/scoped_nsobject.h" 9 #import "base/mac/scoped_nsobject.h"
10 #import "base/mac/sdk_forward_declarations.h" 10 #import "base/mac/sdk_forward_declarations.h"
(...skipping 559 matching lines...) Expand 10 before | Expand all | Expand 10 after
570 if (change.node->data().HasStringAttribute( 570 if (change.node->data().HasStringAttribute(
571 ui::AX_ATTR_CONTAINER_LIVE_STATUS)) { 571 ui::AX_ATTR_CONTAINER_LIVE_STATUS)) {
572 ui::AXNode* live_root = change.node; 572 ui::AXNode* live_root = change.node;
573 while (live_root && 573 while (live_root &&
574 !live_root->data().HasStringAttribute(ui::AX_ATTR_LIVE_STATUS)) 574 !live_root->data().HasStringAttribute(ui::AX_ATTR_LIVE_STATUS))
575 live_root = live_root->parent(); 575 live_root = live_root->parent();
576 if (live_root) 576 if (live_root)
577 tree_events_[live_root->id()].insert(ui::AX_EVENT_LIVE_REGION_CHANGED); 577 tree_events_[live_root->id()].insert(ui::AX_EVENT_LIVE_REGION_CHANGED);
578 } 578 }
579 } 579 }
580
581 if (root_changed && tree->data().loaded)
582 tree_events_[tree->root()->id()].insert(ui::AX_EVENT_LOAD_COMPLETE);
580 } 583 }
581 584
582 NSDictionary* BrowserAccessibilityManagerMac:: 585 NSDictionary* BrowserAccessibilityManagerMac::
583 GetUserInfoForSelectedTextChangedNotification() { 586 GetUserInfoForSelectedTextChangedNotification() {
584 NSMutableDictionary* user_info = [[[NSMutableDictionary alloc] init] 587 NSMutableDictionary* user_info = [[[NSMutableDictionary alloc] init]
585 autorelease]; 588 autorelease];
586 [user_info setObject:@YES forKey:NSAccessibilityTextStateSyncKey]; 589 [user_info setObject:@YES forKey:NSAccessibilityTextStateSyncKey];
587 [user_info setObject:@(AXTextStateChangeTypeUnknown) 590 [user_info setObject:@(AXTextStateChangeTypeUnknown)
588 forKey:NSAccessibilityTextStateChangeTypeKey]; 591 forKey:NSAccessibilityTextStateChangeTypeKey];
589 [user_info setObject:@(AXTextSelectionDirectionUnknown) 592 [user_info setObject:@(AXTextSelectionDirectionUnknown)
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
642 NSAccessibilityTextChangeValues : changes, 645 NSAccessibilityTextChangeValues : changes,
643 NSAccessibilityTextChangeElement : native_node 646 NSAccessibilityTextChangeElement : native_node
644 }; 647 };
645 } 648 }
646 649
647 NSView* BrowserAccessibilityManagerMac::GetParentView() { 650 NSView* BrowserAccessibilityManagerMac::GetParentView() {
648 return delegate() ? delegate()->AccessibilityGetAcceleratedWidget() : nullptr; 651 return delegate() ? delegate()->AccessibilityGetAcceleratedWidget() : nullptr;
649 } 652 }
650 653
651 } // namespace content 654 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698