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

Side by Side Diff: Source/core/accessibility/AXMediaControls.cpp

Issue 291163004: Implement media cast buttons (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase to fix merge problem with TestExpectations Created 6 years, 3 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 /* 1 /*
2 * Copyright (C) 2009 Apple Inc. All rights reserved. 2 * Copyright (C) 2009 Apple Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 case MediaStatusDisplay: 104 case MediaStatusDisplay:
105 return queryString(WebLocalizedString::AXMediaStatusDisplay); 105 return queryString(WebLocalizedString::AXMediaStatusDisplay);
106 case MediaCurrentTimeDisplay: 106 case MediaCurrentTimeDisplay:
107 return queryString(WebLocalizedString::AXMediaCurrentTimeDisplay); 107 return queryString(WebLocalizedString::AXMediaCurrentTimeDisplay);
108 case MediaTimeRemainingDisplay: 108 case MediaTimeRemainingDisplay:
109 return queryString(WebLocalizedString::AXMediaTimeRemainingDisplay); 109 return queryString(WebLocalizedString::AXMediaTimeRemainingDisplay);
110 case MediaShowClosedCaptionsButton: 110 case MediaShowClosedCaptionsButton:
111 return queryString(WebLocalizedString::AXMediaShowClosedCaptionsButton); 111 return queryString(WebLocalizedString::AXMediaShowClosedCaptionsButton);
112 case MediaHideClosedCaptionsButton: 112 case MediaHideClosedCaptionsButton:
113 return queryString(WebLocalizedString::AXMediaHideClosedCaptionsButton); 113 return queryString(WebLocalizedString::AXMediaHideClosedCaptionsButton);
114 case MediaCastOffButton:
115 return queryString(WebLocalizedString::AxMediaCastOffButton);
116 case MediaCastOnButton:
117 return queryString(WebLocalizedString::AxMediaCastOnButton);
114 default: 118 default:
115 return queryString(WebLocalizedString::AXMediaDefault); 119 return queryString(WebLocalizedString::AXMediaDefault);
116 } 120 }
117 } 121 }
118 122
119 String AccessibilityMediaControl::helpText() const 123 String AccessibilityMediaControl::helpText() const
120 { 124 {
121 switch (controlType()) { 125 switch (controlType()) {
122 case MediaEnterFullscreenButton: 126 case MediaEnterFullscreenButton:
123 return queryString(WebLocalizedString::AXMediaEnterFullscreenButtonHelp) ; 127 return queryString(WebLocalizedString::AXMediaEnterFullscreenButtonHelp) ;
(...skipping 10 matching lines...) Expand all
134 case MediaStatusDisplay: 138 case MediaStatusDisplay:
135 return queryString(WebLocalizedString::AXMediaStatusDisplayHelp); 139 return queryString(WebLocalizedString::AXMediaStatusDisplayHelp);
136 case MediaCurrentTimeDisplay: 140 case MediaCurrentTimeDisplay:
137 return queryString(WebLocalizedString::AXMediaCurrentTimeDisplayHelp); 141 return queryString(WebLocalizedString::AXMediaCurrentTimeDisplayHelp);
138 case MediaTimeRemainingDisplay: 142 case MediaTimeRemainingDisplay:
139 return queryString(WebLocalizedString::AXMediaTimeRemainingDisplayHelp); 143 return queryString(WebLocalizedString::AXMediaTimeRemainingDisplayHelp);
140 case MediaShowClosedCaptionsButton: 144 case MediaShowClosedCaptionsButton:
141 return queryString(WebLocalizedString::AXMediaShowClosedCaptionsButtonHe lp); 145 return queryString(WebLocalizedString::AXMediaShowClosedCaptionsButtonHe lp);
142 case MediaHideClosedCaptionsButton: 146 case MediaHideClosedCaptionsButton:
143 return queryString(WebLocalizedString::AXMediaHideClosedCaptionsButtonHe lp); 147 return queryString(WebLocalizedString::AXMediaHideClosedCaptionsButtonHe lp);
148 case MediaCastOffButton:
149 return queryString(WebLocalizedString::AxMediaCastOffButtonHelp);
150 case MediaCastOnButton:
151 return queryString(WebLocalizedString::AxMediaCastOnButtonHelp);
144 default: 152 default:
145 return queryString(WebLocalizedString::AXMediaDefault); 153 return queryString(WebLocalizedString::AXMediaDefault);
146 } 154 }
147 } 155 }
148 156
149 bool AccessibilityMediaControl::computeAccessibilityIsIgnored() const 157 bool AccessibilityMediaControl::computeAccessibilityIsIgnored() const
150 { 158 {
151 if (!m_renderer || !m_renderer->style() || m_renderer->style()->visibility() != VISIBLE || controlType() == MediaTimelineContainer) 159 if (!m_renderer || !m_renderer->style() || m_renderer->style()->visibility() != VISIBLE || controlType() == MediaTimelineContainer)
152 return true; 160 return true;
153 161
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
289 { 297 {
290 if (!m_renderer || !m_renderer->node()) 298 if (!m_renderer || !m_renderer->node())
291 return String(); 299 return String();
292 300
293 MediaControlTimeDisplayElement* element = static_cast<MediaControlTimeDispla yElement*>(m_renderer->node()); 301 MediaControlTimeDisplayElement* element = static_cast<MediaControlTimeDispla yElement*>(m_renderer->node());
294 float time = element->currentValue(); 302 float time = element->currentValue();
295 return localizedMediaTimeDescription(fabsf(time)); 303 return localizedMediaTimeDescription(fabsf(time));
296 } 304 }
297 305
298 } // namespace blink 306 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698