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::usesOverlayFullscreenVideo() const |
| 249 { |
| 250 if (RuntimeEnabledFeatures::forceOverlayFullscreenVideoEnabled()) |
| 251 return true; |
| 252 |
| 253 // TODO(watk): Remove this and the REF check below when the chromium side ch
ange to not |
| 254 // set OverlayFullscreenVideo on Android lands. http://crbug.com/511376 |
| 255 if (HTMLMediaElement::isMediaStreamURL(sourceURL().string())) |
| 256 return false; |
| 257 |
| 258 return RuntimeEnabledFeatures::overlayFullscreenVideoEnabled() |
| 259 || (webMediaPlayer() && webMediaPlayer()->supportsOverlayFullscreenVideo
()); |
| 260 } |
| 261 |
247 void HTMLVideoElement::didMoveToNewDocument(Document& oldDocument) | 262 void HTMLVideoElement::didMoveToNewDocument(Document& oldDocument) |
248 { | 263 { |
249 if (m_imageLoader) | 264 if (m_imageLoader) |
250 m_imageLoader->elementDidMoveToNewDocument(); | 265 m_imageLoader->elementDidMoveToNewDocument(); |
251 HTMLMediaElement::didMoveToNewDocument(oldDocument); | 266 HTMLMediaElement::didMoveToNewDocument(oldDocument); |
252 } | 267 } |
253 | 268 |
254 unsigned HTMLVideoElement::webkitDecodedFrameCount() const | 269 unsigned HTMLVideoElement::webkitDecodedFrameCount() const |
255 { | 270 { |
256 if (!webMediaPlayer()) | 271 if (!webMediaPlayer()) |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
299 { | 314 { |
300 return !isMediaDataCORSSameOrigin(destinationSecurityOrigin); | 315 return !isMediaDataCORSSameOrigin(destinationSecurityOrigin); |
301 } | 316 } |
302 | 317 |
303 FloatSize HTMLVideoElement::elementSize() const | 318 FloatSize HTMLVideoElement::elementSize() const |
304 { | 319 { |
305 return FloatSize(videoWidth(), videoHeight()); | 320 return FloatSize(videoWidth(), videoHeight()); |
306 } | 321 } |
307 | 322 |
308 } // namespace blink | 323 } // namespace blink |
OLD | NEW |