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

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: cleaned up 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 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 #include "core/html/track/VideoTrackList.h" 59 #include "core/html/track/VideoTrackList.h"
60 #include "core/inspector/ConsoleMessage.h" 60 #include "core/inspector/ConsoleMessage.h"
61 #include "core/layout/LayoutVideo.h" 61 #include "core/layout/LayoutVideo.h"
62 #include "core/layout/LayoutView.h" 62 #include "core/layout/LayoutView.h"
63 #include "core/layout/compositing/PaintLayerCompositor.h" 63 #include "core/layout/compositing/PaintLayerCompositor.h"
64 #include "core/loader/FrameLoader.h" 64 #include "core/loader/FrameLoader.h"
65 #include "core/loader/FrameLoaderClient.h" 65 #include "core/loader/FrameLoaderClient.h"
66 #include "core/page/ChromeClient.h" 66 #include "core/page/ChromeClient.h"
67 #include "core/page/NetworkStateNotifier.h" 67 #include "core/page/NetworkStateNotifier.h"
68 #include "platform/ContentType.h" 68 #include "platform/ContentType.h"
69 #include "platform/LayoutTestSupport.h"
69 #include "platform/Logging.h" 70 #include "platform/Logging.h"
70 #include "platform/MIMETypeFromURL.h" 71 #include "platform/MIMETypeFromURL.h"
71 #include "platform/MIMETypeRegistry.h" 72 #include "platform/MIMETypeRegistry.h"
72 #include "platform/RuntimeEnabledFeatures.h" 73 #include "platform/RuntimeEnabledFeatures.h"
73 #include "platform/UserGestureIndicator.h" 74 #include "platform/UserGestureIndicator.h"
74 #include "platform/audio/AudioBus.h" 75 #include "platform/audio/AudioBus.h"
75 #include "platform/audio/AudioSourceProviderClient.h" 76 #include "platform/audio/AudioSourceProviderClient.h"
76 #include "platform/graphics/GraphicsLayer.h" 77 #include "platform/graphics/GraphicsLayer.h"
77 #include "platform/weborigin/SecurityOrigin.h" 78 #include "platform/weborigin/SecurityOrigin.h"
78 #include "public/platform/Platform.h" 79 #include "public/platform/Platform.h"
(...skipping 3016 matching lines...) Expand 10 before | Expand all | Expand 10 after
3095 { 3096 {
3096 WTF_LOG(Media, "HTMLMediaElement::exitFullscreen(%p)", this); 3097 WTF_LOG(Media, "HTMLMediaElement::exitFullscreen(%p)", this);
3097 3098
3098 Fullscreen::from(document()).exitFullscreen(); 3099 Fullscreen::from(document()).exitFullscreen();
3099 } 3100 }
3100 3101
3101 void HTMLMediaElement::didBecomeFullscreenElement() 3102 void HTMLMediaElement::didBecomeFullscreenElement()
3102 { 3103 {
3103 if (mediaControls()) 3104 if (mediaControls())
3104 mediaControls()->enteredFullscreen(); 3105 mediaControls()->enteredFullscreen();
3106 // FIXME: There is no embedder-side handling in layout test mode.
3107 if (webMediaPlayer() && !LayoutTestSupport::isRunningLayoutTest())
3108 webMediaPlayer()->enterFullscreen();
3105 // Cache this in case the player is destroyed before leaving fullscreen. 3109 // Cache this in case the player is destroyed before leaving fullscreen.
3106 m_inOverlayFullscreenVideo = usesOverlayFullscreenVideo(); 3110 m_inOverlayFullscreenVideo = usesOverlayFullscreenVideo();
3107 if (m_inOverlayFullscreenVideo) 3111 if (m_inOverlayFullscreenVideo) {
3108 document().layoutView()->compositor()->setNeedsCompositingUpdate(Composi tingUpdateRebuildTree); 3112 document().layoutView()->compositor()->setNeedsCompositingUpdate(Composi tingUpdateRebuildTree);
3113 }
3109 } 3114 }
3110 3115
3111 void HTMLMediaElement::willStopBeingFullscreenElement() 3116 void HTMLMediaElement::willStopBeingFullscreenElement()
3112 { 3117 {
3113 if (mediaControls()) 3118 if (mediaControls())
3114 mediaControls()->exitedFullscreen(); 3119 mediaControls()->exitedFullscreen();
3115 if (m_inOverlayFullscreenVideo) 3120 if (m_inOverlayFullscreenVideo)
3116 document().layoutView()->compositor()->setNeedsCompositingUpdate(Composi tingUpdateRebuildTree); 3121 document().layoutView()->compositor()->setNeedsCompositingUpdate(Composi tingUpdateRebuildTree);
3117 m_inOverlayFullscreenVideo = false; 3122 m_inOverlayFullscreenVideo = false;
3123 if (webMediaPlayer())
3124 webMediaPlayer()->exitedFullscreen();
3118 } 3125 }
3119 3126
3120 WebLayer* HTMLMediaElement::platformLayer() const 3127 WebLayer* HTMLMediaElement::platformLayer() const
3121 { 3128 {
3122 return m_webLayer; 3129 return m_webLayer;
3123 } 3130 }
3124 3131
3125 bool HTMLMediaElement::hasClosedCaptions() const 3132 bool HTMLMediaElement::hasClosedCaptions() const
3126 { 3133 {
3127 if (m_textTracks) { 3134 if (m_textTracks) {
(...skipping 496 matching lines...) Expand 10 before | Expand all | Expand 10 after
3624 { 3631 {
3625 visitor->trace(m_client); 3632 visitor->trace(m_client);
3626 } 3633 }
3627 3634
3628 DEFINE_TRACE(HTMLMediaElement::AudioSourceProviderImpl) 3635 DEFINE_TRACE(HTMLMediaElement::AudioSourceProviderImpl)
3629 { 3636 {
3630 visitor->trace(m_client); 3637 visitor->trace(m_client);
3631 } 3638 }
3632 3639
3633 } // namespace blink 3640 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698