Chromium Code Reviews| 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 CHROME_BROWSER_UI_VIEWS_ACCESSIBILITY_ACCESSIBILITY_EVENT_ROUTER_VIEWS_H _ | 5 #ifndef CHROME_BROWSER_UI_VIEWS_ACCESSIBILITY_ACCESSIBILITY_EVENT_ROUTER_VIEWS_H _ |
| 6 #define CHROME_BROWSER_UI_VIEWS_ACCESSIBILITY_ACCESSIBILITY_EVENT_ROUTER_VIEWS_H _ | 6 #define CHROME_BROWSER_UI_VIEWS_ACCESSIBILITY_ACCESSIBILITY_EVENT_ROUTER_VIEWS_H _ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| (...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 151 // initialize it to -1 to detect this case. | 151 // initialize it to -1 to detect this case. |
| 152 static void RecursiveGetMenuItemIndexAndCount(views::View* menu, | 152 static void RecursiveGetMenuItemIndexAndCount(views::View* menu, |
| 153 views::View* item, | 153 views::View* item, |
| 154 int* index, | 154 int* index, |
| 155 int* count); | 155 int* count); |
| 156 | 156 |
| 157 // Recursively explore the subviews and return the text from the first | 157 // Recursively explore the subviews and return the text from the first |
| 158 // subview with a role of STATIC_TEXT. | 158 // subview with a role of STATIC_TEXT. |
| 159 static std::string RecursiveGetStaticText(views::View* view); | 159 static std::string RecursiveGetStaticText(views::View* view); |
| 160 | 160 |
| 161 // If a view is not focusable for accessibility, find the closest | |
|
sky
2014/07/15 04:24:25
This comment is mildly confusing. I think you mean
| |
| 162 // ancestor that is, so that the correct accessible name is being read. | |
| 163 static views::View* FindFirstAccessibleAncestor(views::View* view); | |
| 164 | |
| 161 // The profile associated with the most recent window event - used to | 165 // The profile associated with the most recent window event - used to |
| 162 // figure out where to route a few events that can't be directly traced | 166 // figure out where to route a few events that can't be directly traced |
| 163 // to a window with a profile (like menu events). | 167 // to a window with a profile (like menu events). |
| 164 Profile* most_recent_profile_; | 168 Profile* most_recent_profile_; |
| 165 | 169 |
| 170 // The most recent accessibility focusable view is stored in view storage | |
| 171 // and is used to prevent multiple events from being dispatched on a | |
| 172 // hoverable view from its multiple children. This is the id for the most | |
| 173 // recent view we put in view storage. | |
| 174 const int kmost_recent_view_id_; | |
| 175 | |
| 166 // Notification registrar so we can clear most_recent_profile_ when a | 176 // Notification registrar so we can clear most_recent_profile_ when a |
| 167 // profile is destroyed. | 177 // profile is destroyed. |
| 168 content::NotificationRegistrar registrar_; | 178 content::NotificationRegistrar registrar_; |
| 169 | 179 |
| 170 DISALLOW_COPY_AND_ASSIGN(AccessibilityEventRouterViews); | 180 DISALLOW_COPY_AND_ASSIGN(AccessibilityEventRouterViews); |
| 171 }; | 181 }; |
| 172 | 182 |
| 173 #endif // CHROME_BROWSER_UI_VIEWS_ACCESSIBILITY_ACCESSIBILITY_EVENT_ROUTER_VIEW S_H_ | 183 #endif // CHROME_BROWSER_UI_VIEWS_ACCESSIBILITY_ACCESSIBILITY_EVENT_ROUTER_VIEW S_H_ |
| OLD | NEW |