| 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 <vector> | 11 #include <vector> |
| 11 | 12 |
| 12 #include "base/callback_forward.h" | 13 #include "base/callback_forward.h" |
| 13 #include "base/containers/hash_tables.h" | 14 #include "base/containers/hash_tables.h" |
| 14 #include "base/macros.h" | 15 #include "base/macros.h" |
| 15 #include "base/memory/scoped_ptr.h" | |
| 16 #include "build/build_config.h" | 16 #include "build/build_config.h" |
| 17 #include "content/browser/accessibility/ax_tree_id_registry.h" | 17 #include "content/browser/accessibility/ax_tree_id_registry.h" |
| 18 #include "content/common/content_export.h" | 18 #include "content/common/content_export.h" |
| 19 #include "content/public/browser/ax_event_notification_details.h" | 19 #include "content/public/browser/ax_event_notification_details.h" |
| 20 #include "third_party/WebKit/public/web/WebAXEnums.h" | 20 #include "third_party/WebKit/public/web/WebAXEnums.h" |
| 21 #include "ui/accessibility/ax_node_data.h" | 21 #include "ui/accessibility/ax_node_data.h" |
| 22 #include "ui/accessibility/ax_serializable_tree.h" | 22 #include "ui/accessibility/ax_serializable_tree.h" |
| 23 #include "ui/accessibility/ax_tree_update.h" | 23 #include "ui/accessibility/ax_tree_update.h" |
| 24 #include "ui/gfx/native_widget_types.h" | 24 #include "ui/gfx/native_widget_types.h" |
| 25 | 25 |
| (...skipping 361 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 387 // on-screen keyboard to show anytime that a touch event leads to an | 387 // on-screen keyboard to show anytime that a touch event leads to an |
| 388 // editable text control getting focus. | 388 // editable text control getting focus. |
| 389 OSK_ALLOWED | 389 OSK_ALLOWED |
| 390 }; | 390 }; |
| 391 | 391 |
| 392 protected: | 392 protected: |
| 393 // The object that can perform actions on our behalf. | 393 // The object that can perform actions on our behalf. |
| 394 BrowserAccessibilityDelegate* delegate_; | 394 BrowserAccessibilityDelegate* delegate_; |
| 395 | 395 |
| 396 // Factory to create BrowserAccessibility objects (for dependency injection). | 396 // Factory to create BrowserAccessibility objects (for dependency injection). |
| 397 scoped_ptr<BrowserAccessibilityFactory> factory_; | 397 std::unique_ptr<BrowserAccessibilityFactory> factory_; |
| 398 | 398 |
| 399 // The underlying tree of accessibility objects. | 399 // The underlying tree of accessibility objects. |
| 400 scoped_ptr<ui::AXSerializableTree> tree_; | 400 std::unique_ptr<ui::AXSerializableTree> tree_; |
| 401 | 401 |
| 402 // A mapping from a node id to its wrapper of type BrowserAccessibility. | 402 // A mapping from a node id to its wrapper of type BrowserAccessibility. |
| 403 base::hash_map<int32_t, BrowserAccessibility*> id_wrapper_map_; | 403 base::hash_map<int32_t, BrowserAccessibility*> id_wrapper_map_; |
| 404 | 404 |
| 405 // True if the user has initiated a navigation to another page. | 405 // True if the user has initiated a navigation to another page. |
| 406 bool user_is_navigating_away_; | 406 bool user_is_navigating_away_; |
| 407 | 407 |
| 408 // The on-screen keyboard state. | 408 // The on-screen keyboard state. |
| 409 OnScreenKeyboardState osk_state_; | 409 OnScreenKeyboardState osk_state_; |
| 410 | 410 |
| (...skipping 16 matching lines...) Expand all Loading... |
| 427 // node within that parent tree. It's computed as needed and cached for | 427 // node within that parent tree. It's computed as needed and cached for |
| 428 // speed so that it can be accessed quickly if it hasn't changed. | 428 // speed so that it can be accessed quickly if it hasn't changed. |
| 429 int parent_node_id_from_parent_tree_; | 429 int parent_node_id_from_parent_tree_; |
| 430 | 430 |
| 431 DISALLOW_COPY_AND_ASSIGN(BrowserAccessibilityManager); | 431 DISALLOW_COPY_AND_ASSIGN(BrowserAccessibilityManager); |
| 432 }; | 432 }; |
| 433 | 433 |
| 434 } // namespace content | 434 } // namespace content |
| 435 | 435 |
| 436 #endif // CONTENT_BROWSER_ACCESSIBILITY_BROWSER_ACCESSIBILITY_MANAGER_H_ | 436 #endif // CONTENT_BROWSER_ACCESSIBILITY_BROWSER_ACCESSIBILITY_MANAGER_H_ |
| OLD | NEW |