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

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

Issue 830943004: Improve the notifications sent from AXTree updates. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address feedback, add missing call to parent class 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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 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 "content/browser/accessibility/browser_accessibility_manager_android.h" 5 #include "content/browser/accessibility/browser_accessibility_manager_android.h"
6 6
7 #include <cmath> 7 #include <cmath>
8 8
9 #include "base/android/jni_android.h" 9 #include "base/android/jni_android.h"
10 #include "base/android/jni_string.h" 10 #include "base/android/jni_string.h"
(...skipping 706 matching lines...) Expand 10 before | Expand all | Expand 10 after
717 717
718 return true; 718 return true;
719 } 719 }
720 720
721 void BrowserAccessibilityManagerAndroid::SetAccessibilityFocus( 721 void BrowserAccessibilityManagerAndroid::SetAccessibilityFocus(
722 JNIEnv* env, jobject obj, jint id) { 722 JNIEnv* env, jobject obj, jint id) {
723 if (delegate_) 723 if (delegate_)
724 delegate_->AccessibilitySetAccessibilityFocus(id); 724 delegate_->AccessibilitySetAccessibilityFocus(id);
725 } 725 }
726 726
727 void BrowserAccessibilityManagerAndroid::OnRootChanged(ui::AXNode* new_root) { 727 void BrowserAccessibilityManagerAndroid::OnAtomicUpdateFinished(
728 JNIEnv* env = AttachCurrentThread(); 728 bool root_changed,
729 ScopedJavaLocalRef<jobject> obj = java_ref_.get(env); 729 const std::vector<ui::AXTreeDelegate::Change>& changes) {
730 if (obj.is_null()) 730 if (root_changed) {
731 return; 731 JNIEnv* env = AttachCurrentThread();
732 ScopedJavaLocalRef<jobject> obj = java_ref_.get(env);
733 if (obj.is_null())
734 return;
732 735
733 Java_BrowserAccessibilityManager_handleNavigate(env, obj.obj()); 736 Java_BrowserAccessibilityManager_handleNavigate(env, obj.obj());
737 }
734 } 738 }
735 739
736 bool 740 bool
737 BrowserAccessibilityManagerAndroid::UseRootScrollOffsetsWhenComputingBounds() { 741 BrowserAccessibilityManagerAndroid::UseRootScrollOffsetsWhenComputingBounds() {
738 // The Java layer handles the root scroll offset. 742 // The Java layer handles the root scroll offset.
739 return false; 743 return false;
740 } 744 }
741 745
742 bool RegisterBrowserAccessibilityManager(JNIEnv* env) { 746 bool RegisterBrowserAccessibilityManager(JNIEnv* env) {
743 return RegisterNativesImpl(env); 747 return RegisterNativesImpl(env);
744 } 748 }
745 749
746 } // namespace content 750 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698