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

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: compile fix 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 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 16 matching lines...) Expand all
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::AxMediaDownloadButtonHelp:
190 return IDS_AX_MEDIA_DOWNLOAD_BUTTON_HELP;
191 case WebLocalizedString::AxMediaOverflowButtonHelp:
192 return IDS_AX_MEDIA_OVERFLOW_BUTTON_HELP;
185 case WebLocalizedString::AXMillisecondFieldText: 193 case WebLocalizedString::AXMillisecondFieldText:
186 return IDS_AX_MILLISECOND_FIELD_TEXT; 194 return IDS_AX_MILLISECOND_FIELD_TEXT;
187 case WebLocalizedString::AXMinuteFieldText: 195 case WebLocalizedString::AXMinuteFieldText:
188 return IDS_AX_MINUTE_FIELD_TEXT; 196 return IDS_AX_MINUTE_FIELD_TEXT;
189 case WebLocalizedString::AXMonthFieldText: 197 case WebLocalizedString::AXMonthFieldText:
190 return IDS_AX_MONTH_FIELD_TEXT; 198 return IDS_AX_MONTH_FIELD_TEXT;
191 case WebLocalizedString::AXPopUpButtonActionVerb: 199 case WebLocalizedString::AXPopUpButtonActionVerb:
192 return IDS_AX_POP_UP_BUTTON_ACTION_VERB; 200 return IDS_AX_POP_UP_BUTTON_ACTION_VERB;
193 case WebLocalizedString::AXRadioButtonActionVerb: 201 case WebLocalizedString::AXRadioButtonActionVerb:
194 return IDS_AX_RADIO_BUTTON_ACTION_VERB; 202 return IDS_AX_RADIO_BUTTON_ACTION_VERB;
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
237 case WebLocalizedString::OtherColorLabel: 245 case WebLocalizedString::OtherColorLabel:
238 return IDS_FORM_OTHER_COLOR_LABEL; 246 return IDS_FORM_OTHER_COLOR_LABEL;
239 case WebLocalizedString::OtherDateLabel: 247 case WebLocalizedString::OtherDateLabel:
240 return IDS_FORM_OTHER_DATE_LABEL; 248 return IDS_FORM_OTHER_DATE_LABEL;
241 case WebLocalizedString::OtherMonthLabel: 249 case WebLocalizedString::OtherMonthLabel:
242 return IDS_FORM_OTHER_MONTH_LABEL; 250 return IDS_FORM_OTHER_MONTH_LABEL;
243 case WebLocalizedString::OtherTimeLabel: 251 case WebLocalizedString::OtherTimeLabel:
244 return IDS_FORM_OTHER_TIME_LABEL; 252 return IDS_FORM_OTHER_TIME_LABEL;
245 case WebLocalizedString::OtherWeekLabel: 253 case WebLocalizedString::OtherWeekLabel:
246 return IDS_FORM_OTHER_WEEK_LABEL; 254 return IDS_FORM_OTHER_WEEK_LABEL;
247 case WebLocalizedString::AxMediaOverflowButton:
248 return IDS_AX_MEDIA_OVERFLOW_BUTTON;
249 case WebLocalizedString::OverflowMenuCaptions: 255 case WebLocalizedString::OverflowMenuCaptions:
250 return IDS_MEDIA_OVERFLOW_MENU_CLOSED_CAPTIONS; 256 return IDS_MEDIA_OVERFLOW_MENU_CLOSED_CAPTIONS;
251 case WebLocalizedString::OverflowMenuCast: 257 case WebLocalizedString::OverflowMenuCast:
252 return IDS_MEDIA_OVERFLOW_MENU_CAST; 258 return IDS_MEDIA_OVERFLOW_MENU_CAST;
253 case WebLocalizedString::OverflowMenuEnterFullscreen: 259 case WebLocalizedString::OverflowMenuEnterFullscreen:
254 return IDS_MEDIA_OVERFLOW_MENU_ENTER_FULLSCREEN; 260 return IDS_MEDIA_OVERFLOW_MENU_ENTER_FULLSCREEN;
255 case WebLocalizedString::OverflowMenuExitFullscreen: 261 case WebLocalizedString::OverflowMenuExitFullscreen:
256 return IDS_MEDIA_OVERFLOW_MENU_EXIT_FULLSCREEN; 262 return IDS_MEDIA_OVERFLOW_MENU_EXIT_FULLSCREEN;
257 case WebLocalizedString::OverflowMenuStopCast: 263 case WebLocalizedString::OverflowMenuStopCast:
258 return IDS_MEDIA_OVERFLOW_MENU_STOP_CAST; 264 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( 979 return WebString::fromUTF8(ui::KeycodeConverter::DomKeyToKeyString(
974 static_cast<ui::DomKey>(dom_key))); 980 static_cast<ui::DomKey>(dom_key)));
975 } 981 }
976 982
977 int BlinkPlatformImpl::domKeyEnumFromString(const WebString& key_string) { 983 int BlinkPlatformImpl::domKeyEnumFromString(const WebString& key_string) {
978 return static_cast<int>( 984 return static_cast<int>(
979 ui::KeycodeConverter::KeyStringToDomKey(key_string.utf8())); 985 ui::KeycodeConverter::KeyStringToDomKey(key_string.utf8()));
980 } 986 }
981 987
982 } // namespace content 988 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698