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

Side by Side Diff: content/browser/accessibility/browser_accessibility_manager.cc

Issue 1706353002: Added the selected text marker range to the dictionary for the selection change notification (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Now works the first time you start the browser. Created 4 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
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.h" 5 #include "content/browser/accessibility/browser_accessibility_manager.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "build/build_config.h" 10 #include "build/build_config.h"
(...skipping 392 matching lines...) Expand 10 before | Expand all | Expand 10 after
403 return node; 403 return node;
404 } 404 }
405 405
406 bool BrowserAccessibilityManager::NativeViewHasFocus() { 406 bool BrowserAccessibilityManager::NativeViewHasFocus() {
407 BrowserAccessibilityDelegate* delegate = GetDelegateFromRootManager(); 407 BrowserAccessibilityDelegate* delegate = GetDelegateFromRootManager();
408 if (delegate) 408 if (delegate)
409 return delegate->AccessibilityViewHasFocus(); 409 return delegate->AccessibilityViewHasFocus();
410 return false; 410 return false;
411 } 411 }
412 412
413 BrowserAccessibility* BrowserAccessibilityManager::GetFocus() {
414 return GetFocus(GetRoot());
415 }
416
413 BrowserAccessibility* BrowserAccessibilityManager::GetFocus( 417 BrowserAccessibility* BrowserAccessibilityManager::GetFocus(
414 BrowserAccessibility* root) { 418 BrowserAccessibility* root) {
415 if (!focus_) 419 if (!focus_)
416 return nullptr; 420 return nullptr;
417 421
418 if (root && !focus_->IsDescendantOf(root->node())) 422 if (root && !focus_->IsDescendantOf(root->node()))
419 return nullptr; 423 return nullptr;
420 424
421 BrowserAccessibility* obj = GetFromAXNode(focus_); 425 BrowserAccessibility* obj = GetFromAXNode(focus_);
422 DCHECK(obj); 426 DCHECK(obj);
(...skipping 338 matching lines...) Expand 10 before | Expand all | Expand 10 after
761 tree_->CreateTreeSource()); 765 tree_->CreateTreeSource());
762 ui::AXTreeSerializer<const ui::AXNode*, 766 ui::AXTreeSerializer<const ui::AXNode*,
763 ui::AXNodeData, 767 ui::AXNodeData,
764 ui::AXTreeData> serializer(tree_source.get()); 768 ui::AXTreeData> serializer(tree_source.get());
765 ui::AXTreeUpdate update; 769 ui::AXTreeUpdate update;
766 serializer.SerializeChanges(tree_->root(), &update); 770 serializer.SerializeChanges(tree_->root(), &update);
767 return update; 771 return update;
768 } 772 }
769 773
770 } // namespace content 774 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698