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 <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/containers/hash_tables.h" | 10 #include "base/containers/hash_tables.h" |
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
137 BrowserAccessibility* GetFromID(int32 id); | 137 BrowserAccessibility* GetFromID(int32 id); |
138 | 138 |
139 // Called to notify the accessibility manager that its associated native | 139 // Called to notify the accessibility manager that its associated native |
140 // view got focused. | 140 // view got focused. |
141 virtual void OnWindowFocused(); | 141 virtual void OnWindowFocused(); |
142 | 142 |
143 // Called to notify the accessibility manager that its associated native | 143 // Called to notify the accessibility manager that its associated native |
144 // view lost focus. | 144 // view lost focus. |
145 virtual void OnWindowBlurred(); | 145 virtual void OnWindowBlurred(); |
146 | 146 |
| 147 // Notify the accessibility manager about page navigation. |
| 148 void UserIsNavigatingAway(bool is_reload); |
| 149 void NavigationSucceeded(); |
| 150 void NavigationFailed(); |
| 151 |
147 // Called to notify the accessibility manager that a mouse down event | 152 // Called to notify the accessibility manager that a mouse down event |
148 // occurred in the tab. | 153 // occurred in the tab. |
149 void GotMouseDown(); | 154 void GotMouseDown(); |
150 | 155 |
151 // Update the focused node to |node|, which may be null. | 156 // Update the focused node to |node|, which may be null. |
152 // If |notify| is true, send a message to the renderer to set focus | 157 // If |notify| is true, send a message to the renderer to set focus |
153 // to this node. | 158 // to this node. |
154 void SetFocus(ui::AXNode* node, bool notify); | 159 void SetFocus(ui::AXNode* node, bool notify); |
155 void SetFocus(BrowserAccessibility* node, bool notify); | 160 void SetFocus(BrowserAccessibility* node, bool notify); |
156 | 161 |
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
292 | 297 |
293 // The underlying tree of accessibility objects. | 298 // The underlying tree of accessibility objects. |
294 scoped_ptr<ui::AXSerializableTree> tree_; | 299 scoped_ptr<ui::AXSerializableTree> tree_; |
295 | 300 |
296 // The node that currently has focus. | 301 // The node that currently has focus. |
297 ui::AXNode* focus_; | 302 ui::AXNode* focus_; |
298 | 303 |
299 // A mapping from a node id to its wrapper of type BrowserAccessibility. | 304 // A mapping from a node id to its wrapper of type BrowserAccessibility. |
300 base::hash_map<int32, BrowserAccessibility*> id_wrapper_map_; | 305 base::hash_map<int32, BrowserAccessibility*> id_wrapper_map_; |
301 | 306 |
| 307 // True if the user has initiated a navigation to another page. |
| 308 bool user_is_navigating_away_; |
| 309 |
302 // The on-screen keyboard state. | 310 // The on-screen keyboard state. |
303 OnScreenKeyboardState osk_state_; | 311 OnScreenKeyboardState osk_state_; |
304 | 312 |
305 BrowserAccessibilityFindInPageInfo find_in_page_info_; | 313 BrowserAccessibilityFindInPageInfo find_in_page_info_; |
306 | 314 |
307 DISALLOW_COPY_AND_ASSIGN(BrowserAccessibilityManager); | 315 DISALLOW_COPY_AND_ASSIGN(BrowserAccessibilityManager); |
308 }; | 316 }; |
309 | 317 |
310 } // namespace content | 318 } // namespace content |
311 | 319 |
312 #endif // CONTENT_BROWSER_ACCESSIBILITY_BROWSER_ACCESSIBILITY_MANAGER_H_ | 320 #endif // CONTENT_BROWSER_ACCESSIBILITY_BROWSER_ACCESSIBILITY_MANAGER_H_ |
OLD | NEW |