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

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

Issue 1254613003: Let the WebMediaPlayer decide whether to use overlay video. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Address Xianzhu's Comments Created 5 years, 4 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/platform/RuntimeEnabledFeatures.in ('k') | Source/web/tests/WebFrameTest.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 Google 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 are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * 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 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 78
79 updatePageScaleConstraints(false); 79 updatePageScaleConstraints(false);
80 m_webViewImpl->setPageScaleFactor(1.0f); 80 m_webViewImpl->setPageScaleFactor(1.0f);
81 m_webViewImpl->mainFrame()->setScrollOffset(WebSize()); 81 m_webViewImpl->mainFrame()->setScrollOffset(WebSize());
82 m_webViewImpl->setVisualViewportOffset(FloatPoint()); 82 m_webViewImpl->setVisualViewportOffset(FloatPoint());
83 } 83 }
84 84
85 Fullscreen::from(document).didEnterFullScreenForElement(element.get()); 85 Fullscreen::from(document).didEnterFullScreenForElement(element.get());
86 ASSERT(Fullscreen::currentFullScreenElementFrom(document) == element); 86 ASSERT(Fullscreen::currentFullScreenElementFrom(document) == element);
87 87
88 if (RuntimeEnabledFeatures::overlayFullscreenVideoEnabled()) { 88 if (isHTMLVideoElement(element)) {
89 if (isHTMLVideoElement(element)) { 89 HTMLVideoElement* videoElement = toHTMLVideoElement(element);
90 HTMLVideoElement* videoElement = toHTMLVideoElement(element); 90 if (videoElement->usesOverlayFullscreenVideo()) {
91 if (HTMLMediaElement::isMediaStreamURL(videoElement->sourceURL().str ing()))
92 return;
93 if (videoElement->webMediaPlayer() 91 if (videoElement->webMediaPlayer()
94 // FIXME: There is no embedder-side handling in layout test mode . 92 // FIXME: There is no embedder-side handling in layout test mode .
95 && !LayoutTestSupport::isRunningLayoutTest()) { 93 && !LayoutTestSupport::isRunningLayoutTest()) {
96 videoElement->webMediaPlayer()->enterFullscreen(); 94 videoElement->webMediaPlayer()->enterFullscreen();
97 } 95 }
98 if (m_webViewImpl->layerTreeView()) 96 if (m_webViewImpl->layerTreeView())
99 m_webViewImpl->layerTreeView()->setHasTransparentBackground(true ); 97 m_webViewImpl->layerTreeView()->setHasTransparentBackground(true );
100 } 98 }
101 } 99 }
102 } 100 }
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
196 } 194 }
197 195
198 DEFINE_TRACE(FullscreenController) 196 DEFINE_TRACE(FullscreenController)
199 { 197 {
200 visitor->trace(m_provisionalFullScreenElement); 198 visitor->trace(m_provisionalFullScreenElement);
201 visitor->trace(m_fullScreenFrame); 199 visitor->trace(m_fullScreenFrame);
202 } 200 }
203 201
204 } // namespace blink 202 } // namespace blink
205 203
OLDNEW
« no previous file with comments | « Source/platform/RuntimeEnabledFeatures.in ('k') | Source/web/tests/WebFrameTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698