Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(84)

Side by Side Diff: chrome/browser/ui/views/accessibility_event_router_views.h

Issue 8850004: Add a context field to the accessibility extension API. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 9 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 #ifndef CHROME_BROWSER_UI_VIEWS_ACCESSIBILITY_EVENT_ROUTER_VIEWS_H_ 5 #ifndef CHROME_BROWSER_UI_VIEWS_ACCESSIBILITY_EVENT_ROUTER_VIEWS_H_
6 #define CHROME_BROWSER_UI_VIEWS_ACCESSIBILITY_EVENT_ROUTER_VIEWS_H_ 6 #define CHROME_BROWSER_UI_VIEWS_ACCESSIBILITY_EVENT_ROUTER_VIEWS_H_
7 #pragma once 7 #pragma once
8 8
9 #include <string> 9 #include <string>
10 10
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 void SendComboboxNotification( 94 void SendComboboxNotification(
95 views::View* view, int type, Profile* profile); 95 views::View* view, int type, Profile* profile);
96 void SendCheckboxNotification( 96 void SendCheckboxNotification(
97 views::View* view, int type, Profile* profile); 97 views::View* view, int type, Profile* profile);
98 void SendWindowNotification( 98 void SendWindowNotification(
99 views::View* view, int type, Profile* profile); 99 views::View* view, int type, Profile* profile);
100 100
101 // Return the name of a view. 101 // Return the name of a view.
102 std::string GetViewName(views::View* view); 102 std::string GetViewName(views::View* view);
103 103
104 // Get the context of a view - the name of the enclosing group, toolbar,
105 // etc. - and if found, add it to |info|.
106 void AddContextInfo(views::View* view, AccessibilityControlInfo* info);
sky 2011/12/07 22:01:55 Should this return a status indicating whether it
dmazzoni 2011/12/07 23:13:49 Not currently needed but probably a good design fo
107
104 // Return true if it's an event on a menu. 108 // Return true if it's an event on a menu.
105 bool IsMenuEvent(views::View* view, int type); 109 bool IsMenuEvent(views::View* view, int type);
106 110
107 // Recursively explore all menu items of |menu| and return in |count| 111 // Recursively explore all menu items of |menu| and return in |count|
108 // the total number of items, and in |index| the 0-based index of 112 // the total number of items, and in |index| the 0-based index of
109 // |item|, if found. Initialize |count| to zero before calling this 113 // |item|, if found. Initialize |count| to zero before calling this
110 // method. |index| will be unchanged if the item is not found, so 114 // method. |index| will be unchanged if the item is not found, so
111 // initialize it to -1 to detect this case. 115 // initialize it to -1 to detect this case.
112 void RecursiveGetMenuItemIndexAndCount( 116 void RecursiveGetMenuItemIndexAndCount(
113 views::View* menu, views::View* item, int* index, int* count); 117 views::View* menu, views::View* item, int* index, int* count);
114 118
115 // Recursively explore the subviews and return the text from the first 119 // Recursively explore the subviews and return the text from the first
116 // subview with a role of STATIC_TEXT. 120 // subview with a role of STATIC_TEXT.
117 std::string RecursiveGetStaticText(views::View* view); 121 std::string RecursiveGetStaticText(views::View* view);
118 122
123 // Return a descendant of this view with a given accessible role, if found.
124 views::View* FindDescendantWithAccessibleRole(
125 views::View* view, ui::AccessibilityTypes::Role role);
sky 2011/12/07 22:01:55 nit: each param on its own line.
dmazzoni 2011/12/07 23:13:49 Done.
126
119 // The profile associated with the most recent window event - used to 127 // The profile associated with the most recent window event - used to
120 // figure out where to route a few events that can't be directly traced 128 // figure out where to route a few events that can't be directly traced
121 // to a window with a profile (like menu events). 129 // to a window with a profile (like menu events).
122 Profile* most_recent_profile_; 130 Profile* most_recent_profile_;
123 }; 131 };
124 132
125 #endif // CHROME_BROWSER_UI_VIEWS_ACCESSIBILITY_EVENT_ROUTER_VIEWS_H_ 133 #endif // CHROME_BROWSER_UI_VIEWS_ACCESSIBILITY_EVENT_ROUTER_VIEWS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698