OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |