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 #ifndef CONTENT_BROWSER_ACCESSIBILITY_BROWSER_ACCESSIBILITY_MANAGER_ANDROID_H_ | 5 #ifndef CONTENT_BROWSER_ACCESSIBILITY_BROWSER_ACCESSIBILITY_MANAGER_ANDROID_H_ |
6 #define CONTENT_BROWSER_ACCESSIBILITY_BROWSER_ACCESSIBILITY_MANAGER_ANDROID_H_ | 6 #define CONTENT_BROWSER_ACCESSIBILITY_BROWSER_ACCESSIBILITY_MANAGER_ANDROID_H_ |
7 | 7 |
8 #include "base/android/scoped_java_ref.h" | 8 #include "base/android/scoped_java_ref.h" |
9 #include "content/browser/accessibility/browser_accessibility_manager.h" | 9 #include "content/browser/accessibility/browser_accessibility_manager.h" |
10 #include "content/browser/android/content_view_core_impl.h" | 10 #include "content/browser/android/content_view_core_impl.h" |
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
116 int32 granularity, int cursor_index, | 116 int32 granularity, int cursor_index, |
117 BrowserAccessibilityAndroid* node, int32* start_index, int32* end_index); | 117 BrowserAccessibilityAndroid* node, int32* start_index, int32* end_index); |
118 | 118 |
119 // Set accessibility focus. This sends a message to the renderer to | 119 // Set accessibility focus. This sends a message to the renderer to |
120 // asynchronously load inline text boxes for this node only, enabling more | 120 // asynchronously load inline text boxes for this node only, enabling more |
121 // accurate movement by granularities on this node. | 121 // accurate movement by granularities on this node. |
122 void SetAccessibilityFocus(JNIEnv* env, jobject obj, jint id); | 122 void SetAccessibilityFocus(JNIEnv* env, jobject obj, jint id); |
123 | 123 |
124 protected: | 124 protected: |
125 // AXTreeDelegate overrides. | 125 // AXTreeDelegate overrides. |
126 virtual void OnRootChanged(ui::AXNode* new_root) override; | 126 void OnAtomicUpdateFinished( |
| 127 bool root_changed, |
| 128 const std::vector<ui::AXTreeDelegate::Change>& changes) override; |
127 | 129 |
128 virtual bool UseRootScrollOffsetsWhenComputingBounds() override; | 130 virtual bool UseRootScrollOffsetsWhenComputingBounds() override; |
129 | 131 |
130 private: | 132 private: |
131 // This gives BrowserAccessibilityManager::Create access to the class | 133 // This gives BrowserAccessibilityManager::Create access to the class |
132 // constructor. | 134 // constructor. |
133 friend class BrowserAccessibilityManager; | 135 friend class BrowserAccessibilityManager; |
134 | 136 |
135 // A weak reference to the Java BrowserAccessibilityManager object. | 137 // A weak reference to the Java BrowserAccessibilityManager object. |
136 // This avoids adding another reference to BrowserAccessibilityManager and | 138 // This avoids adding another reference to BrowserAccessibilityManager and |
137 // preventing garbage collection. | 139 // preventing garbage collection. |
138 // Premature garbage collection is prevented by the long-lived reference in | 140 // Premature garbage collection is prevented by the long-lived reference in |
139 // ContentViewCore. | 141 // ContentViewCore. |
140 JavaObjectWeakGlobalRef java_ref_; | 142 JavaObjectWeakGlobalRef java_ref_; |
141 | 143 |
142 // Handle a hover event from the renderer process. | 144 // Handle a hover event from the renderer process. |
143 void HandleHoverEvent(BrowserAccessibility* node); | 145 void HandleHoverEvent(BrowserAccessibility* node); |
144 | 146 |
145 DISALLOW_COPY_AND_ASSIGN(BrowserAccessibilityManagerAndroid); | 147 DISALLOW_COPY_AND_ASSIGN(BrowserAccessibilityManagerAndroid); |
146 }; | 148 }; |
147 | 149 |
148 bool RegisterBrowserAccessibilityManager(JNIEnv* env); | 150 bool RegisterBrowserAccessibilityManager(JNIEnv* env); |
149 | 151 |
150 } | 152 } |
151 | 153 |
152 #endif // CONTENT_BROWSER_ACCESSIBILITY_BROWSER_ACCESSIBILITY_MANAGER_ANDROID_H
_ | 154 #endif // CONTENT_BROWSER_ACCESSIBILITY_BROWSER_ACCESSIBILITY_MANAGER_ANDROID_H
_ |
OLD | NEW |