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 <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include "base/android/scoped_java_ref.h" | 10 #include "base/android/scoped_java_ref.h" |
(...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
253 void OnAtomicUpdateFinished( | 253 void OnAtomicUpdateFinished( |
254 ui::AXTree* tree, | 254 ui::AXTree* tree, |
255 bool root_changed, | 255 bool root_changed, |
256 const std::vector<ui::AXTreeDelegate::Change>& changes) override; | 256 const std::vector<ui::AXTreeDelegate::Change>& changes) override; |
257 | 257 |
258 bool UseRootScrollOffsetsWhenComputingBounds() override; | 258 bool UseRootScrollOffsetsWhenComputingBounds() override; |
259 | 259 |
260 private: | 260 private: |
261 BrowserAccessibilityAndroid* GetFromUniqueID(int32_t unique_id); | 261 BrowserAccessibilityAndroid* GetFromUniqueID(int32_t unique_id); |
262 | 262 |
263 base::android::ScopedJavaLocalRef<jobject> GetJavaRefFromRootManager(); | 263 base::android::ScopedJavaLocalRef<jobject> GetJavaRefFromRootManager(); |
| 264 |
| 265 void CollectStats(); |
264 | 266 |
265 // This gives BrowserAccessibilityManager::Create access to the class | 267 // This gives BrowserAccessibilityManager::Create access to the class |
266 // constructor. | 268 // constructor. |
267 friend class BrowserAccessibilityManager; | 269 friend class BrowserAccessibilityManager; |
268 | 270 |
269 // A weak reference to the Java BrowserAccessibilityManager object. | 271 // A weak reference to the Java BrowserAccessibilityManager object. |
270 // This avoids adding another reference to BrowserAccessibilityManager and | 272 // This avoids adding another reference to BrowserAccessibilityManager and |
271 // preventing garbage collection. | 273 // preventing garbage collection. |
272 // Premature garbage collection is prevented by the long-lived reference in | 274 // Premature garbage collection is prevented by the long-lived reference in |
273 // ContentViewCore. | 275 // ContentViewCore. |
274 JavaObjectWeakGlobalRef java_ref_; | 276 JavaObjectWeakGlobalRef java_ref_; |
275 | 277 |
276 // Handle a hover event from the renderer process. | 278 // Handle a hover event from the renderer process. |
277 void HandleHoverEvent(BrowserAccessibility* node); | 279 void HandleHoverEvent(BrowserAccessibility* node); |
278 | 280 |
279 // See docs for set_prune_tree_for_screen_reader, above. | 281 // See docs for set_prune_tree_for_screen_reader, above. |
280 bool prune_tree_for_screen_reader_; | 282 bool prune_tree_for_screen_reader_; |
281 | 283 |
282 DISALLOW_COPY_AND_ASSIGN(BrowserAccessibilityManagerAndroid); | 284 DISALLOW_COPY_AND_ASSIGN(BrowserAccessibilityManagerAndroid); |
283 }; | 285 }; |
284 | 286 |
285 bool RegisterBrowserAccessibilityManager(JNIEnv* env); | 287 bool RegisterBrowserAccessibilityManager(JNIEnv* env); |
286 | 288 |
287 } | 289 } |
288 | 290 |
289 #endif // CONTENT_BROWSER_ACCESSIBILITY_BROWSER_ACCESSIBILITY_MANAGER_ANDROID_H
_ | 291 #endif // CONTENT_BROWSER_ACCESSIBILITY_BROWSER_ACCESSIBILITY_MANAGER_ANDROID_H
_ |
OLD | NEW |