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 | 444 // A queue of accessibility events to fire based on changes to the |
445 // accessibility tree. Only used within the scope of one call to | 445 // accessibility tree. Each one is an event and a node id. |
446 // OnAccessibilityEvents, so it's safe to store raw pointers. | 446 std::vector<std::pair<ui::AXEvent, int32_t>> tree_events_; |
447 std::vector<std::pair<ui::AXEvent, BrowserAccessibility*>> tree_events_; | |
448 | 447 |
449 // True if the user has initiated a navigation to another page. | 448 // True if the user has initiated a navigation to another page. |
450 bool user_is_navigating_away_; | 449 bool user_is_navigating_away_; |
451 | 450 |
452 // The on-screen keyboard state. | 451 // The on-screen keyboard state. |
453 OnScreenKeyboardState osk_state_; | 452 OnScreenKeyboardState osk_state_; |
454 | 453 |
455 BrowserAccessibilityFindInPageInfo find_in_page_info_; | 454 BrowserAccessibilityFindInPageInfo find_in_page_info_; |
456 | 455 |
457 // These are only used by the root BrowserAccessibilityManager of a | 456 // These are only used by the root BrowserAccessibilityManager of a |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
493 // used and it won't be updated from the delegate. | 492 // used and it won't be updated from the delegate. |
494 bool use_custom_device_scale_factor_for_testing_; | 493 bool use_custom_device_scale_factor_for_testing_; |
495 | 494 |
496 private: | 495 private: |
497 DISALLOW_COPY_AND_ASSIGN(BrowserAccessibilityManager); | 496 DISALLOW_COPY_AND_ASSIGN(BrowserAccessibilityManager); |
498 }; | 497 }; |
499 | 498 |
500 } // namespace content | 499 } // namespace content |
501 | 500 |
502 #endif // CONTENT_BROWSER_ACCESSIBILITY_BROWSER_ACCESSIBILITY_MANAGER_H_ | 501 #endif // CONTENT_BROWSER_ACCESSIBILITY_BROWSER_ACCESSIBILITY_MANAGER_H_ |
OLD | NEW |