OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #include "chrome/browser/ui/views/accessibility_event_router_views.h" | 5 #include "chrome/browser/ui/views/accessibility_event_router_views.h" |
6 | 6 |
7 #include "base/basictypes.h" | 7 #include "base/basictypes.h" |
8 #include "base/callback.h" | 8 #include "base/callback.h" |
9 #include "base/message_loop.h" | 9 #include "base/message_loop.h" |
10 #include "base/utf_string_conversions.h" | 10 #include "base/utf_string_conversions.h" |
11 #include "chrome/browser/browser_process.h" | 11 #include "chrome/browser/browser_process.h" |
12 #include "chrome/browser/extensions/extension_accessibility_api.h" | 12 #include "chrome/browser/extensions/extension_accessibility_api.h" |
13 #include "chrome/browser/profiles/profile.h" | 13 #include "chrome/browser/profiles/profile.h" |
14 #include "chrome/browser/profiles/profile_manager.h" | 14 #include "chrome/browser/profiles/profile_manager.h" |
15 #include "chrome/common/chrome_notification_types.h" | 15 #include "chrome/common/chrome_notification_types.h" |
16 #include "ui/base/accessibility/accessible_view_state.h" | 16 #include "ui/base/accessibility/accessible_view_state.h" |
| 17 #include "ui/views/widget/widget.h" |
17 #include "views/controls/button/text_button.h" | 18 #include "views/controls/button/text_button.h" |
18 #include "views/controls/menu/menu_item_view.h" | 19 #include "views/controls/menu/menu_item_view.h" |
19 #include "views/controls/menu/submenu_view.h" | 20 #include "views/controls/menu/submenu_view.h" |
20 #include "views/view.h" | 21 #include "views/view.h" |
21 #include "views/widget/widget.h" | |
22 | 22 |
23 using views::FocusManager; | 23 using views::FocusManager; |
24 | 24 |
25 AccessibilityEventRouterViews::AccessibilityEventRouterViews() | 25 AccessibilityEventRouterViews::AccessibilityEventRouterViews() |
26 : most_recent_profile_(NULL) { | 26 : most_recent_profile_(NULL) { |
27 } | 27 } |
28 | 28 |
29 AccessibilityEventRouterViews::~AccessibilityEventRouterViews() { | 29 AccessibilityEventRouterViews::~AccessibilityEventRouterViews() { |
30 } | 30 } |
31 | 31 |
(...skipping 308 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
340 return UTF16ToUTF8(state.name); | 340 return UTF16ToUTF8(state.name); |
341 | 341 |
342 for (int i = 0; i < view->child_count(); ++i) { | 342 for (int i = 0; i < view->child_count(); ++i) { |
343 views::View* child = view->child_at(i); | 343 views::View* child = view->child_at(i); |
344 std::string result = RecursiveGetStaticText(child); | 344 std::string result = RecursiveGetStaticText(child); |
345 if (!result.empty()) | 345 if (!result.empty()) |
346 return result; | 346 return result; |
347 } | 347 } |
348 return std::string(); | 348 return std::string(); |
349 } | 349 } |
OLD | NEW |