Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 /* | 1 /* |
| 2 * Copyright (C) 2007, 2008, 2009, 2010 Apple Inc. All rights reserved. | 2 * Copyright (C) 2007, 2008, 2009, 2010 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 20 matching lines...) Expand all Loading... | |
| 31 #include "core/HTMLNames.h" | 31 #include "core/HTMLNames.h" |
| 32 #include "core/dom/Attribute.h" | 32 #include "core/dom/Attribute.h" |
| 33 #include "core/dom/Document.h" | 33 #include "core/dom/Document.h" |
| 34 #include "core/dom/ExceptionCode.h" | 34 #include "core/dom/ExceptionCode.h" |
| 35 #include "core/dom/Fullscreen.h" | 35 #include "core/dom/Fullscreen.h" |
| 36 #include "core/dom/shadow/ShadowRoot.h" | 36 #include "core/dom/shadow/ShadowRoot.h" |
| 37 #include "core/frame/Settings.h" | 37 #include "core/frame/Settings.h" |
| 38 #include "core/html/parser/HTMLParserIdioms.h" | 38 #include "core/html/parser/HTMLParserIdioms.h" |
| 39 #include "core/layout/LayoutImage.h" | 39 #include "core/layout/LayoutImage.h" |
| 40 #include "core/layout/LayoutVideo.h" | 40 #include "core/layout/LayoutVideo.h" |
| 41 #include "platform/RuntimeEnabledFeatures.h" | |
| 41 #include "platform/UserGestureIndicator.h" | 42 #include "platform/UserGestureIndicator.h" |
| 42 #include "platform/graphics/GraphicsContext.h" | 43 #include "platform/graphics/GraphicsContext.h" |
| 43 #include "platform/graphics/ImageBuffer.h" | 44 #include "platform/graphics/ImageBuffer.h" |
| 44 #include "platform/graphics/gpu/Extensions3DUtil.h" | 45 #include "platform/graphics/gpu/Extensions3DUtil.h" |
| 45 #include "public/platform/WebCanvas.h" | 46 #include "public/platform/WebCanvas.h" |
| 46 #include "public/platform/WebGraphicsContext3D.h" | 47 #include "public/platform/WebGraphicsContext3D.h" |
| 47 | 48 |
| 48 namespace blink { | 49 namespace blink { |
| 49 | 50 |
| 50 using namespace HTMLNames; | 51 using namespace HTMLNames; |
| (...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 237 bool HTMLVideoElement::webkitSupportsFullscreen() | 238 bool HTMLVideoElement::webkitSupportsFullscreen() |
| 238 { | 239 { |
| 239 return Fullscreen::fullscreenEnabled(document()); | 240 return Fullscreen::fullscreenEnabled(document()); |
| 240 } | 241 } |
| 241 | 242 |
| 242 bool HTMLVideoElement::webkitDisplayingFullscreen() | 243 bool HTMLVideoElement::webkitDisplayingFullscreen() |
| 243 { | 244 { |
| 244 return isFullscreen(); | 245 return isFullscreen(); |
| 245 } | 246 } |
| 246 | 247 |
| 248 bool HTMLVideoElement::supportsOverlayFullscreenVideo() const | |
| 249 { | |
| 250 // For WebRTC, the video frame contains all the data and no hardware surface | |
| 251 // should be used. | |
| 252 return !HTMLMediaElement::isMediaStreamURL(sourceURL().string()) | |
| 253 && (RuntimeEnabledFeatures::overlayFullscreenVideoEnabled() | |
| 254 || (webMediaPlayer() && webMediaPlayer()->supportsOverlayFullscreenV ideo())); | |
|
trchen
2015/07/30 21:29:21
This condition feels weird to me. I'd prefer it th
watk
2015/08/03 21:47:44
I've added forceCverlayFullscreenVideo which can b
| |
| 255 } | |
| 256 | |
| 247 void HTMLVideoElement::didMoveToNewDocument(Document& oldDocument) | 257 void HTMLVideoElement::didMoveToNewDocument(Document& oldDocument) |
| 248 { | 258 { |
| 249 if (m_imageLoader) | 259 if (m_imageLoader) |
| 250 m_imageLoader->elementDidMoveToNewDocument(); | 260 m_imageLoader->elementDidMoveToNewDocument(); |
| 251 HTMLMediaElement::didMoveToNewDocument(oldDocument); | 261 HTMLMediaElement::didMoveToNewDocument(oldDocument); |
| 252 } | 262 } |
| 253 | 263 |
| 254 unsigned HTMLVideoElement::webkitDecodedFrameCount() const | 264 unsigned HTMLVideoElement::webkitDecodedFrameCount() const |
| 255 { | 265 { |
| 256 if (!webMediaPlayer()) | 266 if (!webMediaPlayer()) |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 299 { | 309 { |
| 300 return !isMediaDataCORSSameOrigin(destinationSecurityOrigin); | 310 return !isMediaDataCORSSameOrigin(destinationSecurityOrigin); |
| 301 } | 311 } |
| 302 | 312 |
| 303 FloatSize HTMLVideoElement::elementSize() const | 313 FloatSize HTMLVideoElement::elementSize() const |
| 304 { | 314 { |
| 305 return FloatSize(videoWidth(), videoHeight()); | 315 return FloatSize(videoWidth(), videoHeight()); |
| 306 } | 316 } |
| 307 | 317 |
| 308 } // namespace blink | 318 } // namespace blink |
| OLD | NEW |