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 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 64 private: | 64 private: |
| 65 friend struct DefaultSingletonTraits<AccessibilityEventRouterViews>; | 65 friend struct DefaultSingletonTraits<AccessibilityEventRouterViews>; |
| 66 | 66 |
| 67 FRIEND_TEST_ALL_PREFIXES(AccessibilityEventRouterViewsTest, | 67 FRIEND_TEST_ALL_PREFIXES(AccessibilityEventRouterViewsTest, |
| 68 TestFocusNotification); | 68 TestFocusNotification); |
| 69 | 69 |
| 70 AccessibilityEventRouterViews(); | 70 AccessibilityEventRouterViews(); |
| 71 virtual ~AccessibilityEventRouterViews(); | 71 virtual ~AccessibilityEventRouterViews(); |
| 72 | 72 |
| 73 // Call DispatchAccessibilityNotification using a view storage id. | 73 // Call DispatchAccessibilityNotification using a view storage id. |
| 74 static void DispatchNotificationOnViewStorageId( | 74 static void DispatchNotificationOnViewStorageId( |
|
dmazzoni
2013/08/14 19:36:37
How about renaming Notification -> Event to match
Cait (Slow)
2013/08/14 20:53:36
Done.
| |
| 75 int view_storage_id, | 75 int view_storage_id, |
| 76 chrome::NotificationType type); | 76 ui::AccessibilityTypes::Event type); |
| 77 | 77 |
| 78 // Checks the type of the view and calls one of the more specific | 78 // Checks the type of the view and calls one of the more specific |
| 79 // Send*Notification methods, below. | 79 // Send*Notification methods, below. |
| 80 void DispatchAccessibilityNotification( | 80 void DispatchAccessibilityNotification( |
| 81 views::View* view, | 81 views::View* view, |
| 82 chrome::NotificationType type); | 82 ui::AccessibilityTypes::Event type); |
| 83 | 83 |
| 84 // Each of these methods constructs an AccessibilityControlInfo object | 84 // Each of these methods constructs an AccessibilityControlInfo object |
| 85 // and sends a notification of a specific accessibility event. | 85 // and sends a notification of a specific accessibility event. |
| 86 static void SendButtonNotification( | 86 static void SendButtonNotification( |
| 87 views::View* view, | 87 views::View* view, |
| 88 int type, | 88 ui::AccessibilityTypes::Event type, |
| 89 Profile* profile); | 89 Profile* profile); |
| 90 static void SendLinkNotification( | 90 static void SendLinkNotification( |
| 91 views::View* view, | 91 views::View* view, |
| 92 int type, | 92 ui::AccessibilityTypes::Event type, |
| 93 Profile* profile); | 93 Profile* profile); |
| 94 static void SendMenuNotification( | 94 static void SendMenuNotification( |
| 95 views::View* view, | 95 views::View* view, |
| 96 int type, | 96 ui::AccessibilityTypes::Event type, |
| 97 Profile* profile); | 97 Profile* profile); |
| 98 static void SendMenuItemNotification( | 98 static void SendMenuItemNotification( |
| 99 views::View* view, | 99 views::View* view, |
| 100 int type, | 100 ui::AccessibilityTypes::Event type, |
| 101 Profile* profile); | 101 Profile* profile); |
| 102 static void SendTextfieldNotification( | 102 static void SendTextfieldNotification( |
| 103 views::View* view, | 103 views::View* view, |
| 104 int type, | 104 ui::AccessibilityTypes::Event type, |
| 105 Profile* profile); | 105 Profile* profile); |
| 106 static void SendComboboxNotification( | 106 static void SendComboboxNotification( |
| 107 views::View* view, | 107 views::View* view, |
| 108 int type, | 108 ui::AccessibilityTypes::Event type, |
| 109 Profile* profile); | 109 Profile* profile); |
| 110 static void SendCheckboxNotification( | 110 static void SendCheckboxNotification( |
| 111 views::View* view, | 111 views::View* view, |
| 112 int type, | 112 ui::AccessibilityTypes::Event type, |
| 113 Profile* profile); | 113 Profile* profile); |
| 114 static void SendWindowNotification( | 114 static void SendWindowNotification( |
| 115 views::View* view, | 115 views::View* view, |
| 116 int type, | 116 ui::AccessibilityTypes::Event type, |
| 117 Profile* profile); | 117 Profile* profile); |
| 118 static void SendSliderNotification( | 118 static void SendSliderNotification( |
| 119 views::View* view, | 119 views::View* view, |
| 120 int type, | 120 ui::AccessibilityTypes::Event type, |
| 121 Profile* profile); | 121 Profile* profile); |
| 122 | 122 |
| 123 // Return the name of a view. | 123 // Return the name of a view. |
| 124 static std::string GetViewName(views::View* view); | 124 static std::string GetViewName(views::View* view); |
| 125 | 125 |
| 126 // Get the context of a view - the name of the enclosing group, toolbar, etc. | 126 // Get the context of a view - the name of the enclosing group, toolbar, etc. |
| 127 static std::string GetViewContext(views::View* view); | 127 static std::string GetViewContext(views::View* view); |
| 128 | 128 |
| 129 // Return a descendant of this view with a given accessible role, if found. | 129 // Return a descendant of this view with a given accessible role, if found. |
| 130 static views::View* FindDescendantWithAccessibleRole( | 130 static views::View* FindDescendantWithAccessibleRole( |
| (...skipping 24 matching lines...) Expand all Loading... | |
| 155 Profile* most_recent_profile_; | 155 Profile* most_recent_profile_; |
| 156 | 156 |
| 157 // Notification registrar so we can clear most_recent_profile_ when a | 157 // Notification registrar so we can clear most_recent_profile_ when a |
| 158 // profile is destroyed. | 158 // profile is destroyed. |
| 159 content::NotificationRegistrar registrar_; | 159 content::NotificationRegistrar registrar_; |
| 160 | 160 |
| 161 DISALLOW_COPY_AND_ASSIGN(AccessibilityEventRouterViews); | 161 DISALLOW_COPY_AND_ASSIGN(AccessibilityEventRouterViews); |
| 162 }; | 162 }; |
| 163 | 163 |
| 164 #endif // CHROME_BROWSER_UI_VIEWS_ACCESSIBILITY_ACCESSIBILITY_EVENT_ROUTER_VIEW S_H_ | 164 #endif // CHROME_BROWSER_UI_VIEWS_ACCESSIBILITY_ACCESSIBILITY_EVENT_ROUTER_VIEW S_H_ |
| OLD | NEW |