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 "views/controls/button/text_button.h" | 17 #include "views/controls/button/text_button.h" |
18 #include "views/controls/menu/menu_item_view.h" | 18 #include "views/controls/menu/menu_item_view.h" |
19 #include "views/controls/menu/submenu_view.h" | 19 #include "views/controls/menu/submenu_view.h" |
20 #include "views/view.h" | 20 #include "views/view.h" |
21 #include "views/widget/widget.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 ALLOW_THIS_IN_INITIALIZER_LIST(method_factory_(this)) { | |
28 } | 27 } |
29 | 28 |
30 AccessibilityEventRouterViews::~AccessibilityEventRouterViews() { | 29 AccessibilityEventRouterViews::~AccessibilityEventRouterViews() { |
31 } | 30 } |
32 | 31 |
33 // static | 32 // static |
34 AccessibilityEventRouterViews* AccessibilityEventRouterViews::GetInstance() { | 33 AccessibilityEventRouterViews* AccessibilityEventRouterViews::GetInstance() { |
35 return Singleton<AccessibilityEventRouterViews>::get(); | 34 return Singleton<AccessibilityEventRouterViews>::get(); |
36 } | 35 } |
37 | 36 |
(...skipping 303 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
341 return UTF16ToUTF8(state.name); | 340 return UTF16ToUTF8(state.name); |
342 | 341 |
343 for (int i = 0; i < view->child_count(); ++i) { | 342 for (int i = 0; i < view->child_count(); ++i) { |
344 views::View* child = view->child_at(i); | 343 views::View* child = view->child_at(i); |
345 std::string result = RecursiveGetStaticText(child); | 344 std::string result = RecursiveGetStaticText(child); |
346 if (!result.empty()) | 345 if (!result.empty()) |
347 return result; | 346 return result; |
348 } | 347 } |
349 return std::string(); | 348 return std::string(); |
350 } | 349 } |
OLD | NEW |