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

Side by Side Diff: third_party/WebKit/Source/core/html/HTMLMediaElement.cpp

Issue 1655083002: Enable SurfaceView fullscreen video on Android with WebMediaPlayerImpl (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@avda-sv
Patch Set: Created 4 years, 10 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) 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple Inc. All rights reserved. 2 * Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012, 2013 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 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 3086 matching lines...) Expand 10 before | Expand all | Expand 10 after
3097 3097
3098 Fullscreen::from(document()).exitFullscreen(); 3098 Fullscreen::from(document()).exitFullscreen();
3099 } 3099 }
3100 3100
3101 void HTMLMediaElement::didBecomeFullscreenElement() 3101 void HTMLMediaElement::didBecomeFullscreenElement()
3102 { 3102 {
3103 if (mediaControls()) 3103 if (mediaControls())
3104 mediaControls()->enteredFullscreen(); 3104 mediaControls()->enteredFullscreen();
3105 // Cache this in case the player is destroyed before leaving fullscreen. 3105 // Cache this in case the player is destroyed before leaving fullscreen.
3106 m_inOverlayFullscreenVideo = usesOverlayFullscreenVideo(); 3106 m_inOverlayFullscreenVideo = usesOverlayFullscreenVideo();
3107 if (m_inOverlayFullscreenVideo) 3107 if (m_inOverlayFullscreenVideo) {
3108 document().layoutView()->compositor()->setNeedsCompositingUpdate(Composi tingUpdateRebuildTree); 3108 document().layoutView()->compositor()->setNeedsCompositingUpdate(Composi tingUpdateRebuildTree);
3109 } else if (webMediaPlayer()) {
3110 webMediaPlayer()->enterFullscreen();
3111 }
3109 } 3112 }
3110 3113
3111 void HTMLMediaElement::willStopBeingFullscreenElement() 3114 void HTMLMediaElement::willStopBeingFullscreenElement()
3112 { 3115 {
3113 if (mediaControls()) 3116 if (mediaControls())
3114 mediaControls()->exitedFullscreen(); 3117 mediaControls()->exitedFullscreen();
3115 if (m_inOverlayFullscreenVideo) 3118 if (m_inOverlayFullscreenVideo)
3116 document().layoutView()->compositor()->setNeedsCompositingUpdate(Composi tingUpdateRebuildTree); 3119 document().layoutView()->compositor()->setNeedsCompositingUpdate(Composi tingUpdateRebuildTree);
3117 m_inOverlayFullscreenVideo = false; 3120 m_inOverlayFullscreenVideo = false;
3121 if (webMediaPlayer())
3122 webMediaPlayer()->exitedFullscreen();
3118 } 3123 }
3119 3124
3120 WebLayer* HTMLMediaElement::platformLayer() const 3125 WebLayer* HTMLMediaElement::platformLayer() const
3121 { 3126 {
3122 return m_webLayer; 3127 return m_webLayer;
3123 } 3128 }
3124 3129
3125 bool HTMLMediaElement::hasClosedCaptions() const 3130 bool HTMLMediaElement::hasClosedCaptions() const
3126 { 3131 {
3127 if (m_textTracks) { 3132 if (m_textTracks) {
(...skipping 496 matching lines...) Expand 10 before | Expand all | Expand 10 after
3624 { 3629 {
3625 visitor->trace(m_client); 3630 visitor->trace(m_client);
3626 } 3631 }
3627 3632
3628 DEFINE_TRACE(HTMLMediaElement::AudioSourceProviderImpl) 3633 DEFINE_TRACE(HTMLMediaElement::AudioSourceProviderImpl)
3629 { 3634 {
3630 visitor->trace(m_client); 3635 visitor->trace(m_client);
3631 } 3636 }
3632 3637
3633 } // namespace blink 3638 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698