| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_H_ | 5 #ifndef CONTENT_BROWSER_ACCESSIBILITY_BROWSER_ACCESSIBILITY_MANAGER_H_ |
| 6 #define CONTENT_BROWSER_ACCESSIBILITY_BROWSER_ACCESSIBILITY_MANAGER_H_ | 6 #define CONTENT_BROWSER_ACCESSIBILITY_BROWSER_ACCESSIBILITY_MANAGER_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <memory> | 10 #include <memory> |
| (...skipping 423 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 434 | 434 |
| 435 // Factory to create BrowserAccessibility objects (for dependency injection). | 435 // Factory to create BrowserAccessibility objects (for dependency injection). |
| 436 std::unique_ptr<BrowserAccessibilityFactory> factory_; | 436 std::unique_ptr<BrowserAccessibilityFactory> factory_; |
| 437 | 437 |
| 438 // The underlying tree of accessibility objects. | 438 // The underlying tree of accessibility objects. |
| 439 std::unique_ptr<ui::AXSerializableTree> tree_; | 439 std::unique_ptr<ui::AXSerializableTree> tree_; |
| 440 | 440 |
| 441 // A mapping from a node id to its wrapper of type BrowserAccessibility. | 441 // A mapping from a node id to its wrapper of type BrowserAccessibility. |
| 442 base::hash_map<int32_t, BrowserAccessibility*> id_wrapper_map_; | 442 base::hash_map<int32_t, BrowserAccessibility*> id_wrapper_map_; |
| 443 | 443 |
| 444 // A list of accessibility events to fire based on changes to the |
| 445 // accessibility tree. Only used within the scope of one call to |
| 446 // OnAccessibilityEvents, so it's safe to store raw pointers. |
| 447 std::vector<std::pair<ui::AXEvent, BrowserAccessibility*>> tree_events_; |
| 448 |
| 444 // True if the user has initiated a navigation to another page. | 449 // True if the user has initiated a navigation to another page. |
| 445 bool user_is_navigating_away_; | 450 bool user_is_navigating_away_; |
| 446 | 451 |
| 447 // The on-screen keyboard state. | 452 // The on-screen keyboard state. |
| 448 OnScreenKeyboardState osk_state_; | 453 OnScreenKeyboardState osk_state_; |
| 449 | 454 |
| 450 BrowserAccessibilityFindInPageInfo find_in_page_info_; | 455 BrowserAccessibilityFindInPageInfo find_in_page_info_; |
| 451 | 456 |
| 452 // These are only used by the root BrowserAccessibilityManager of a | 457 // These are only used by the root BrowserAccessibilityManager of a |
| 453 // frame tree. Stores the last focused node and last focused manager so | 458 // frame tree. Stores the last focused node and last focused manager so |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 488 // used and it won't be updated from the delegate. | 493 // used and it won't be updated from the delegate. |
| 489 bool use_custom_device_scale_factor_for_testing_; | 494 bool use_custom_device_scale_factor_for_testing_; |
| 490 | 495 |
| 491 private: | 496 private: |
| 492 DISALLOW_COPY_AND_ASSIGN(BrowserAccessibilityManager); | 497 DISALLOW_COPY_AND_ASSIGN(BrowserAccessibilityManager); |
| 493 }; | 498 }; |
| 494 | 499 |
| 495 } // namespace content | 500 } // namespace content |
| 496 | 501 |
| 497 #endif // CONTENT_BROWSER_ACCESSIBILITY_BROWSER_ACCESSIBILITY_MANAGER_H_ | 502 #endif // CONTENT_BROWSER_ACCESSIBILITY_BROWSER_ACCESSIBILITY_MANAGER_H_ |
| OLD | NEW |