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

Unified Diff: third_party/WebKit/Source/core/html/HTMLVideoElement.cpp

Issue 2696893002: [Blink>Media] Add heuristic for dominant video detection for Android (Closed)
Patch Set: nits Created 3 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/html/HTMLVideoElement.cpp
diff --git a/third_party/WebKit/Source/core/html/HTMLVideoElement.cpp b/third_party/WebKit/Source/core/html/HTMLVideoElement.cpp
index fb4daa679ce0224022e3b29c6f7a54fa294f6426..9b915b95dd7d202ecce9b1fc70ecf556e1fd6bf5 100644
--- a/third_party/WebKit/Source/core/html/HTMLVideoElement.cpp
+++ b/third_party/WebKit/Source/core/html/HTMLVideoElement.cpp
@@ -25,6 +25,7 @@
#include "core/html/HTMLVideoElement.h"
+#include <memory>
#include "bindings/core/v8/ExceptionState.h"
#include "core/CSSPropertyNames.h"
#include "core/HTMLNames.h"
@@ -36,6 +37,7 @@
#include "core/frame/ImageBitmap.h"
#include "core/frame/LocalDOMWindow.h"
#include "core/frame/Settings.h"
+#include "core/html/MediaCustomControlsFullscreenDetector.h"
#include "core/html/parser/HTMLParserIdioms.h"
#include "core/imagebitmap/ImageBitmapOptions.h"
#include "core/layout/LayoutImage.h"
@@ -46,14 +48,15 @@
#include "platform/graphics/ImageBuffer.h"
#include "platform/graphics/gpu/Extensions3DUtil.h"
#include "public/platform/WebCanvas.h"
-#include <memory>
namespace blink {
using namespace HTMLNames;
inline HTMLVideoElement::HTMLVideoElement(Document& document)
- : HTMLMediaElement(videoTag, document) {
+ : HTMLMediaElement(videoTag, document),
+ m_customControlsFullscreenDetector(
+ new MediaCustomControlsFullscreenDetector(*this)) {
if (document.settings()) {
m_defaultPosterURL =
AtomicString(document.settings()->getDefaultVideoPosterURL());
@@ -69,6 +72,7 @@ HTMLVideoElement* HTMLVideoElement::create(Document& document) {
DEFINE_TRACE(HTMLVideoElement) {
visitor->trace(m_imageLoader);
+ visitor->trace(m_customControlsFullscreenDetector);
HTMLMediaElement::trace(visitor);
}
@@ -277,6 +281,7 @@ bool HTMLVideoElement::usesOverlayFullscreenVideo() const {
void HTMLVideoElement::didMoveToNewDocument(Document& oldDocument) {
if (m_imageLoader)
m_imageLoader->elementDidMoveToNewDocument();
+
HTMLMediaElement::didMoveToNewDocument(oldDocument);
}

Powered by Google App Engine
This is Rietveld 408576698