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 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
49 | 49 |
50 // Handle a menu item being focused (separate because a menu item is | 50 // Handle a menu item being focused (separate because a menu item is |
51 // not necessarily its own view). | 51 // not necessarily its own view). |
52 void HandleMenuItemFocused(const base::string16& menu_name, | 52 void HandleMenuItemFocused(const base::string16& menu_name, |
53 const base::string16& menu_item_name, | 53 const base::string16& menu_item_name, |
54 int item_index, | 54 int item_index, |
55 int item_count, | 55 int item_count, |
56 bool has_submenu); | 56 bool has_submenu); |
57 | 57 |
58 // NotificationObserver implementation. | 58 // NotificationObserver implementation. |
59 virtual void Observe(int type, | 59 void Observe(int type, |
60 const content::NotificationSource& source, | 60 const content::NotificationSource& source, |
61 const content::NotificationDetails& details) override; | 61 const content::NotificationDetails& details) override; |
62 | 62 |
63 private: | 63 private: |
64 friend struct DefaultSingletonTraits<AccessibilityEventRouterViews>; | 64 friend struct DefaultSingletonTraits<AccessibilityEventRouterViews>; |
65 | 65 |
66 FRIEND_TEST_ALL_PREFIXES(AccessibilityEventRouterViewsTest, | 66 FRIEND_TEST_ALL_PREFIXES(AccessibilityEventRouterViewsTest, |
67 TestFocusNotification); | 67 TestFocusNotification); |
68 FRIEND_TEST_ALL_PREFIXES(AccessibilityEventRouterViewsTest, | 68 FRIEND_TEST_ALL_PREFIXES(AccessibilityEventRouterViewsTest, |
69 MenuIndexAndCountForInvisibleMenu); | 69 MenuIndexAndCountForInvisibleMenu); |
70 FRIEND_TEST_ALL_PREFIXES(AccessibilityEventRouterViewsTest, | 70 FRIEND_TEST_ALL_PREFIXES(AccessibilityEventRouterViewsTest, |
71 AccessibilityFocusableView); | 71 AccessibilityFocusableView); |
72 | 72 |
73 AccessibilityEventRouterViews(); | 73 AccessibilityEventRouterViews(); |
74 virtual ~AccessibilityEventRouterViews(); | 74 ~AccessibilityEventRouterViews() override; |
75 | 75 |
76 // Call DispatchAccessibilityEvent using a view storage id. | 76 // Call DispatchAccessibilityEvent using a view storage id. |
77 static void DispatchEventOnViewStorageId( | 77 static void DispatchEventOnViewStorageId( |
78 int view_storage_id, | 78 int view_storage_id, |
79 ui::AXEvent event); | 79 ui::AXEvent event); |
80 | 80 |
81 // Checks the type of the view and calls one of the more specific | 81 // Checks the type of the view and calls one of the more specific |
82 // Send*Notification methods, below. | 82 // Send*Notification methods, below. |
83 void DispatchAccessibilityEvent( | 83 void DispatchAccessibilityEvent( |
84 views::View* view, | 84 views::View* view, |
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
184 const int most_recent_view_id_; | 184 const int most_recent_view_id_; |
185 | 185 |
186 // Notification registrar so we can clear most_recent_profile_ when a | 186 // Notification registrar so we can clear most_recent_profile_ when a |
187 // profile is destroyed. | 187 // profile is destroyed. |
188 content::NotificationRegistrar registrar_; | 188 content::NotificationRegistrar registrar_; |
189 | 189 |
190 DISALLOW_COPY_AND_ASSIGN(AccessibilityEventRouterViews); | 190 DISALLOW_COPY_AND_ASSIGN(AccessibilityEventRouterViews); |
191 }; | 191 }; |
192 | 192 |
193 #endif // CHROME_BROWSER_UI_VIEWS_ACCESSIBILITY_ACCESSIBILITY_EVENT_ROUTER_VIEW
S_H_ | 193 #endif // CHROME_BROWSER_UI_VIEWS_ACCESSIBILITY_ACCESSIBILITY_EVENT_ROUTER_VIEW
S_H_ |
OLD | NEW |