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