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

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

Issue 1182783008: Add an option to not prune the Android AX tree, to preserve more style info. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@style_info_sgurun
Patch Set: Un-disable tests Created 5 years, 6 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 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 BrowserAccessibilityManagerAndroid* 63 BrowserAccessibilityManagerAndroid*
64 BrowserAccessibilityManager::ToBrowserAccessibilityManagerAndroid() { 64 BrowserAccessibilityManager::ToBrowserAccessibilityManagerAndroid() {
65 return static_cast<BrowserAccessibilityManagerAndroid*>(this); 65 return static_cast<BrowserAccessibilityManagerAndroid*>(this);
66 } 66 }
67 67
68 BrowserAccessibilityManagerAndroid::BrowserAccessibilityManagerAndroid( 68 BrowserAccessibilityManagerAndroid::BrowserAccessibilityManagerAndroid(
69 ScopedJavaLocalRef<jobject> content_view_core, 69 ScopedJavaLocalRef<jobject> content_view_core,
70 const ui::AXTreeUpdate& initial_tree, 70 const ui::AXTreeUpdate& initial_tree,
71 BrowserAccessibilityDelegate* delegate, 71 BrowserAccessibilityDelegate* delegate,
72 BrowserAccessibilityFactory* factory) 72 BrowserAccessibilityFactory* factory)
73 : BrowserAccessibilityManager(delegate, factory) { 73 : BrowserAccessibilityManager(delegate, factory),
74 prune_tree_for_screen_reader_(true) {
74 Initialize(initial_tree); 75 Initialize(initial_tree);
75 SetContentViewCore(content_view_core); 76 SetContentViewCore(content_view_core);
76 } 77 }
77 78
78 BrowserAccessibilityManagerAndroid::~BrowserAccessibilityManagerAndroid() { 79 BrowserAccessibilityManagerAndroid::~BrowserAccessibilityManagerAndroid() {
79 JNIEnv* env = AttachCurrentThread(); 80 JNIEnv* env = AttachCurrentThread();
80 ScopedJavaLocalRef<jobject> obj = java_ref_.get(env); 81 ScopedJavaLocalRef<jobject> obj = java_ref_.get(env);
81 if (obj.is_null()) 82 if (obj.is_null())
82 return; 83 return;
83 84
(...skipping 662 matching lines...) Expand 10 before | Expand all | Expand 10 after
746 BrowserAccessibilityManagerAndroid::UseRootScrollOffsetsWhenComputingBounds() { 747 BrowserAccessibilityManagerAndroid::UseRootScrollOffsetsWhenComputingBounds() {
747 // The Java layer handles the root scroll offset. 748 // The Java layer handles the root scroll offset.
748 return false; 749 return false;
749 } 750 }
750 751
751 bool RegisterBrowserAccessibilityManager(JNIEnv* env) { 752 bool RegisterBrowserAccessibilityManager(JNIEnv* env) {
752 return RegisterNativesImpl(env); 753 return RegisterNativesImpl(env);
753 } 754 }
754 755
755 } // namespace content 756 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698