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

Side by Side Diff: content/child/blink_platform_impl.cc

Issue 2402263002: Media Controls a11y: add text/description/role to more controls components. (Closed)
Patch Set: review comments Created 4 years, 2 months 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "content/child/blink_platform_impl.h" 5 #include "content/child/blink_platform_impl.h"
6 6
7 #include <math.h> 7 #include <math.h>
8 8
9 #include <memory> 9 #include <memory>
10 #include <vector> 10 #include <vector>
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
135 case WebLocalizedString::AXMediaStatusDisplay: 135 case WebLocalizedString::AXMediaStatusDisplay:
136 return IDS_AX_MEDIA_STATUS_DISPLAY; 136 return IDS_AX_MEDIA_STATUS_DISPLAY;
137 case WebLocalizedString::AXMediaEnterFullscreenButton: 137 case WebLocalizedString::AXMediaEnterFullscreenButton:
138 return IDS_AX_MEDIA_ENTER_FULL_SCREEN_BUTTON; 138 return IDS_AX_MEDIA_ENTER_FULL_SCREEN_BUTTON;
139 case WebLocalizedString::AXMediaExitFullscreenButton: 139 case WebLocalizedString::AXMediaExitFullscreenButton:
140 return IDS_AX_MEDIA_EXIT_FULL_SCREEN_BUTTON; 140 return IDS_AX_MEDIA_EXIT_FULL_SCREEN_BUTTON;
141 case WebLocalizedString::AXMediaShowClosedCaptionsButton: 141 case WebLocalizedString::AXMediaShowClosedCaptionsButton:
142 return IDS_AX_MEDIA_SHOW_CLOSED_CAPTIONS_BUTTON; 142 return IDS_AX_MEDIA_SHOW_CLOSED_CAPTIONS_BUTTON;
143 case WebLocalizedString::AXMediaHideClosedCaptionsButton: 143 case WebLocalizedString::AXMediaHideClosedCaptionsButton:
144 return IDS_AX_MEDIA_HIDE_CLOSED_CAPTIONS_BUTTON; 144 return IDS_AX_MEDIA_HIDE_CLOSED_CAPTIONS_BUTTON;
145 case WebLocalizedString::AxMediaCastOffButton: 145 case WebLocalizedString::AXMediaCastOffButton:
146 return IDS_AX_MEDIA_CAST_OFF_BUTTON; 146 return IDS_AX_MEDIA_CAST_OFF_BUTTON;
147 case WebLocalizedString::AxMediaCastOnButton: 147 case WebLocalizedString::AXMediaCastOnButton:
148 return IDS_AX_MEDIA_CAST_ON_BUTTON; 148 return IDS_AX_MEDIA_CAST_ON_BUTTON;
149 case WebLocalizedString::AXMediaDownloadButton:
150 return IDS_AX_MEDIA_DOWNLOAD_BUTTON;
151 case WebLocalizedString::AXMediaOverflowButton:
152 return IDS_AX_MEDIA_OVERFLOW_BUTTON;
149 case WebLocalizedString::AXMediaAudioElementHelp: 153 case WebLocalizedString::AXMediaAudioElementHelp:
150 return IDS_AX_MEDIA_AUDIO_ELEMENT_HELP; 154 return IDS_AX_MEDIA_AUDIO_ELEMENT_HELP;
151 case WebLocalizedString::AXMediaVideoElementHelp: 155 case WebLocalizedString::AXMediaVideoElementHelp:
152 return IDS_AX_MEDIA_VIDEO_ELEMENT_HELP; 156 return IDS_AX_MEDIA_VIDEO_ELEMENT_HELP;
153 case WebLocalizedString::AXMediaMuteButtonHelp: 157 case WebLocalizedString::AXMediaMuteButtonHelp:
154 return IDS_AX_MEDIA_MUTE_BUTTON_HELP; 158 return IDS_AX_MEDIA_MUTE_BUTTON_HELP;
155 case WebLocalizedString::AXMediaUnMuteButtonHelp: 159 case WebLocalizedString::AXMediaUnMuteButtonHelp:
156 return IDS_AX_MEDIA_UNMUTE_BUTTON_HELP; 160 return IDS_AX_MEDIA_UNMUTE_BUTTON_HELP;
157 case WebLocalizedString::AXMediaPlayButtonHelp: 161 case WebLocalizedString::AXMediaPlayButtonHelp:
158 return IDS_AX_MEDIA_PLAY_BUTTON_HELP; 162 return IDS_AX_MEDIA_PLAY_BUTTON_HELP;
(...skipping 12 matching lines...) Expand all
171 case WebLocalizedString::AXMediaStatusDisplayHelp: 175 case WebLocalizedString::AXMediaStatusDisplayHelp:
172 return IDS_AX_MEDIA_STATUS_DISPLAY_HELP; 176 return IDS_AX_MEDIA_STATUS_DISPLAY_HELP;
173 case WebLocalizedString::AXMediaEnterFullscreenButtonHelp: 177 case WebLocalizedString::AXMediaEnterFullscreenButtonHelp:
174 return IDS_AX_MEDIA_ENTER_FULL_SCREEN_BUTTON_HELP; 178 return IDS_AX_MEDIA_ENTER_FULL_SCREEN_BUTTON_HELP;
175 case WebLocalizedString::AXMediaExitFullscreenButtonHelp: 179 case WebLocalizedString::AXMediaExitFullscreenButtonHelp:
176 return IDS_AX_MEDIA_EXIT_FULL_SCREEN_BUTTON_HELP; 180 return IDS_AX_MEDIA_EXIT_FULL_SCREEN_BUTTON_HELP;
177 case WebLocalizedString::AXMediaShowClosedCaptionsButtonHelp: 181 case WebLocalizedString::AXMediaShowClosedCaptionsButtonHelp:
178 return IDS_AX_MEDIA_SHOW_CLOSED_CAPTIONS_BUTTON_HELP; 182 return IDS_AX_MEDIA_SHOW_CLOSED_CAPTIONS_BUTTON_HELP;
179 case WebLocalizedString::AXMediaHideClosedCaptionsButtonHelp: 183 case WebLocalizedString::AXMediaHideClosedCaptionsButtonHelp:
180 return IDS_AX_MEDIA_HIDE_CLOSED_CAPTIONS_BUTTON_HELP; 184 return IDS_AX_MEDIA_HIDE_CLOSED_CAPTIONS_BUTTON_HELP;
181 case WebLocalizedString::AxMediaCastOffButtonHelp: 185 case WebLocalizedString::AXMediaCastOffButtonHelp:
182 return IDS_AX_MEDIA_CAST_OFF_BUTTON_HELP; 186 return IDS_AX_MEDIA_CAST_OFF_BUTTON_HELP;
183 case WebLocalizedString::AxMediaCastOnButtonHelp: 187 case WebLocalizedString::AXMediaCastOnButtonHelp:
184 return IDS_AX_MEDIA_CAST_ON_BUTTON_HELP; 188 return IDS_AX_MEDIA_CAST_ON_BUTTON_HELP;
189 case WebLocalizedString::AXMediaOverflowButtonHelp:
190 return IDS_AX_MEDIA_OVERFLOW_BUTTON_HELP;
185 case WebLocalizedString::AXMillisecondFieldText: 191 case WebLocalizedString::AXMillisecondFieldText:
186 return IDS_AX_MILLISECOND_FIELD_TEXT; 192 return IDS_AX_MILLISECOND_FIELD_TEXT;
187 case WebLocalizedString::AXMinuteFieldText: 193 case WebLocalizedString::AXMinuteFieldText:
188 return IDS_AX_MINUTE_FIELD_TEXT; 194 return IDS_AX_MINUTE_FIELD_TEXT;
189 case WebLocalizedString::AXMonthFieldText: 195 case WebLocalizedString::AXMonthFieldText:
190 return IDS_AX_MONTH_FIELD_TEXT; 196 return IDS_AX_MONTH_FIELD_TEXT;
191 case WebLocalizedString::AXPopUpButtonActionVerb: 197 case WebLocalizedString::AXPopUpButtonActionVerb:
192 return IDS_AX_POP_UP_BUTTON_ACTION_VERB; 198 return IDS_AX_POP_UP_BUTTON_ACTION_VERB;
193 case WebLocalizedString::AXRadioButtonActionVerb: 199 case WebLocalizedString::AXRadioButtonActionVerb:
194 return IDS_AX_RADIO_BUTTON_ACTION_VERB; 200 return IDS_AX_RADIO_BUTTON_ACTION_VERB;
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
237 case WebLocalizedString::OtherColorLabel: 243 case WebLocalizedString::OtherColorLabel:
238 return IDS_FORM_OTHER_COLOR_LABEL; 244 return IDS_FORM_OTHER_COLOR_LABEL;
239 case WebLocalizedString::OtherDateLabel: 245 case WebLocalizedString::OtherDateLabel:
240 return IDS_FORM_OTHER_DATE_LABEL; 246 return IDS_FORM_OTHER_DATE_LABEL;
241 case WebLocalizedString::OtherMonthLabel: 247 case WebLocalizedString::OtherMonthLabel:
242 return IDS_FORM_OTHER_MONTH_LABEL; 248 return IDS_FORM_OTHER_MONTH_LABEL;
243 case WebLocalizedString::OtherTimeLabel: 249 case WebLocalizedString::OtherTimeLabel:
244 return IDS_FORM_OTHER_TIME_LABEL; 250 return IDS_FORM_OTHER_TIME_LABEL;
245 case WebLocalizedString::OtherWeekLabel: 251 case WebLocalizedString::OtherWeekLabel:
246 return IDS_FORM_OTHER_WEEK_LABEL; 252 return IDS_FORM_OTHER_WEEK_LABEL;
247 case WebLocalizedString::AxMediaOverflowButton:
248 return IDS_AX_MEDIA_OVERFLOW_BUTTON;
249 case WebLocalizedString::OverflowMenuCaptions: 253 case WebLocalizedString::OverflowMenuCaptions:
250 return IDS_MEDIA_OVERFLOW_MENU_CLOSED_CAPTIONS; 254 return IDS_MEDIA_OVERFLOW_MENU_CLOSED_CAPTIONS;
251 case WebLocalizedString::OverflowMenuCast: 255 case WebLocalizedString::OverflowMenuCast:
252 return IDS_MEDIA_OVERFLOW_MENU_CAST; 256 return IDS_MEDIA_OVERFLOW_MENU_CAST;
253 case WebLocalizedString::OverflowMenuEnterFullscreen: 257 case WebLocalizedString::OverflowMenuEnterFullscreen:
254 return IDS_MEDIA_OVERFLOW_MENU_ENTER_FULLSCREEN; 258 return IDS_MEDIA_OVERFLOW_MENU_ENTER_FULLSCREEN;
255 case WebLocalizedString::OverflowMenuExitFullscreen: 259 case WebLocalizedString::OverflowMenuExitFullscreen:
256 return IDS_MEDIA_OVERFLOW_MENU_EXIT_FULLSCREEN; 260 return IDS_MEDIA_OVERFLOW_MENU_EXIT_FULLSCREEN;
257 case WebLocalizedString::OverflowMenuStopCast: 261 case WebLocalizedString::OverflowMenuStopCast:
258 return IDS_MEDIA_OVERFLOW_MENU_STOP_CAST; 262 return IDS_MEDIA_OVERFLOW_MENU_STOP_CAST;
(...skipping 714 matching lines...) Expand 10 before | Expand all | Expand 10 after
973 return WebString::fromUTF8(ui::KeycodeConverter::DomKeyToKeyString( 977 return WebString::fromUTF8(ui::KeycodeConverter::DomKeyToKeyString(
974 static_cast<ui::DomKey>(dom_key))); 978 static_cast<ui::DomKey>(dom_key)));
975 } 979 }
976 980
977 int BlinkPlatformImpl::domKeyEnumFromString(const WebString& key_string) { 981 int BlinkPlatformImpl::domKeyEnumFromString(const WebString& key_string) {
978 return static_cast<int>( 982 return static_cast<int>(
979 ui::KeycodeConverter::KeyStringToDomKey(key_string.utf8())); 983 ui::KeycodeConverter::KeyStringToDomKey(key_string.utf8()));
980 } 984 }
981 985
982 } // namespace content 986 } // namespace content
OLDNEW
« no previous file with comments | « content/app/strings/content_strings.grd ('k') | third_party/WebKit/Source/modules/accessibility/AXMediaControls.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698