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

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

Issue 1689043002: Add WebMediaPlayer::exitedFullscreen() and call it from HTMLMediaElement (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
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 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
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/Histogram.h" 69 #include "platform/Histogram.h"
70 #include "platform/LayoutTestSupport.h"
70 #include "platform/Logging.h" 71 #include "platform/Logging.h"
71 #include "platform/MIMETypeFromURL.h" 72 #include "platform/MIMETypeFromURL.h"
72 #include "platform/MIMETypeRegistry.h" 73 #include "platform/MIMETypeRegistry.h"
73 #include "platform/RuntimeEnabledFeatures.h" 74 #include "platform/RuntimeEnabledFeatures.h"
74 #include "platform/UserGestureIndicator.h" 75 #include "platform/UserGestureIndicator.h"
75 #include "platform/audio/AudioBus.h" 76 #include "platform/audio/AudioBus.h"
76 #include "platform/audio/AudioSourceProviderClient.h" 77 #include "platform/audio/AudioSourceProviderClient.h"
77 #include "platform/graphics/GraphicsLayer.h" 78 #include "platform/graphics/GraphicsLayer.h"
78 #include "platform/weborigin/SecurityOrigin.h" 79 #include "platform/weborigin/SecurityOrigin.h"
79 #include "public/platform/Platform.h" 80 #include "public/platform/Platform.h"
(...skipping 3017 matching lines...) Expand 10 before | Expand all | Expand 10 after
3097 { 3098 {
3098 WTF_LOG(Media, "HTMLMediaElement::exitFullscreen(%p)", this); 3099 WTF_LOG(Media, "HTMLMediaElement::exitFullscreen(%p)", this);
3099 3100
3100 Fullscreen::from(document()).exitFullscreen(); 3101 Fullscreen::from(document()).exitFullscreen();
3101 } 3102 }
3102 3103
3103 void HTMLMediaElement::didBecomeFullscreenElement() 3104 void HTMLMediaElement::didBecomeFullscreenElement()
3104 { 3105 {
3105 if (mediaControls()) 3106 if (mediaControls())
3106 mediaControls()->enteredFullscreen(); 3107 mediaControls()->enteredFullscreen();
3108 // FIXME: There is no embedder-side handling in layout test mode.
3109 if (webMediaPlayer() && !LayoutTestSupport::isRunningLayoutTest())
3110 webMediaPlayer()->enteredFullscreen();
3107 // Cache this in case the player is destroyed before leaving fullscreen. 3111 // Cache this in case the player is destroyed before leaving fullscreen.
3108 m_inOverlayFullscreenVideo = usesOverlayFullscreenVideo(); 3112 m_inOverlayFullscreenVideo = usesOverlayFullscreenVideo();
3109 if (m_inOverlayFullscreenVideo) 3113 if (m_inOverlayFullscreenVideo)
3110 document().layoutView()->compositor()->setNeedsCompositingUpdate(Composi tingUpdateRebuildTree); 3114 document().layoutView()->compositor()->setNeedsCompositingUpdate(Composi tingUpdateRebuildTree);
3111 } 3115 }
3112 3116
3113 void HTMLMediaElement::willStopBeingFullscreenElement() 3117 void HTMLMediaElement::willStopBeingFullscreenElement()
3114 { 3118 {
3115 if (mediaControls()) 3119 if (mediaControls())
3116 mediaControls()->exitedFullscreen(); 3120 mediaControls()->exitedFullscreen();
3121 if (webMediaPlayer())
3122 webMediaPlayer()->exitedFullscreen();
3117 if (m_inOverlayFullscreenVideo) 3123 if (m_inOverlayFullscreenVideo)
3118 document().layoutView()->compositor()->setNeedsCompositingUpdate(Composi tingUpdateRebuildTree); 3124 document().layoutView()->compositor()->setNeedsCompositingUpdate(Composi tingUpdateRebuildTree);
3119 m_inOverlayFullscreenVideo = false; 3125 m_inOverlayFullscreenVideo = false;
3120 } 3126 }
3121 3127
3122 WebLayer* HTMLMediaElement::platformLayer() const 3128 WebLayer* HTMLMediaElement::platformLayer() const
3123 { 3129 {
3124 return m_webLayer; 3130 return m_webLayer;
3125 } 3131 }
3126 3132
(...skipping 499 matching lines...) Expand 10 before | Expand all | Expand 10 after
3626 { 3632 {
3627 visitor->trace(m_client); 3633 visitor->trace(m_client);
3628 } 3634 }
3629 3635
3630 DEFINE_TRACE(HTMLMediaElement::AudioSourceProviderImpl) 3636 DEFINE_TRACE(HTMLMediaElement::AudioSourceProviderImpl)
3631 { 3637 {
3632 visitor->trace(m_client); 3638 visitor->trace(m_client);
3633 } 3639 }
3634 3640
3635 } // namespace blink 3641 } // namespace blink
OLDNEW
« no previous file with comments | « content/renderer/media/android/webmediaplayer_android.cc ('k') | third_party/WebKit/Source/web/FullscreenController.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698