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

Side by Side Diff: Source/web/WebMediaPlayerClientImpl.cpp

Issue 291303003: Eliminate MediaPlayer & MediaPlayerClient abstractions (fullscreen apis) (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: rebase Created 6 years, 6 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
« no previous file with comments | « Source/web/WebMediaPlayerClientImpl.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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 "config.h" 5 #include "config.h"
6 #include "web/WebMediaPlayerClientImpl.h" 6 #include "web/WebMediaPlayerClientImpl.h"
7 7
8 #include "core/frame/LocalFrame.h" 8 #include "core/frame/LocalFrame.h"
9 #include "core/html/HTMLMediaElement.h" 9 #include "core/html/HTMLMediaElement.h"
10 #include "core/html/TimeRanges.h" 10 #include "core/html/TimeRanges.h"
(...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after
210 if (m_webMediaPlayer) 210 if (m_webMediaPlayer)
211 m_webMediaPlayer->play(); 211 m_webMediaPlayer->play();
212 } 212 }
213 213
214 void WebMediaPlayerClientImpl::pause() 214 void WebMediaPlayerClientImpl::pause()
215 { 215 {
216 if (m_webMediaPlayer) 216 if (m_webMediaPlayer)
217 m_webMediaPlayer->pause(); 217 m_webMediaPlayer->pause();
218 } 218 }
219 219
220 void WebMediaPlayerClientImpl::showFullscreenOverlay()
221 {
222 if (m_webMediaPlayer)
223 m_webMediaPlayer->enterFullscreen();
224 }
225
226 void WebMediaPlayerClientImpl::hideFullscreenOverlay()
227 {
228 if (m_webMediaPlayer)
229 m_webMediaPlayer->exitFullscreen();
230 }
231
232 bool WebMediaPlayerClientImpl::canShowFullscreenOverlay() const
233 {
234 return m_webMediaPlayer && m_webMediaPlayer->canEnterFullscreen();
235 }
236
237 double WebMediaPlayerClientImpl::duration() const 220 double WebMediaPlayerClientImpl::duration() const
238 { 221 {
239 if (m_webMediaPlayer) 222 if (m_webMediaPlayer)
240 return m_webMediaPlayer->duration(); 223 return m_webMediaPlayer->duration();
241 return 0.0; 224 return 0.0;
242 } 225 }
243 226
244 double WebMediaPlayerClientImpl::currentTime() const 227 double WebMediaPlayerClientImpl::currentTime() const
245 { 228 {
246 if (m_webMediaPlayer) 229 if (m_webMediaPlayer)
(...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after
491 474
492 void WebMediaPlayerClientImpl::AudioClientImpl::setFormat(size_t numberOfChannel s, float sampleRate) 475 void WebMediaPlayerClientImpl::AudioClientImpl::setFormat(size_t numberOfChannel s, float sampleRate)
493 { 476 {
494 if (m_client) 477 if (m_client)
495 m_client->setFormat(numberOfChannels, sampleRate); 478 m_client->setFormat(numberOfChannels, sampleRate);
496 } 479 }
497 480
498 #endif 481 #endif
499 482
500 } // namespace blink 483 } // namespace blink
OLDNEW
« no previous file with comments | « Source/web/WebMediaPlayerClientImpl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698