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

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

Issue 2732293003: Adding UMA on page load size for pages with Media (Closed)
Patch Set: self-review Created 3 years, 9 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/HTMLMediaElement.cpp
diff --git a/third_party/WebKit/Source/core/html/HTMLMediaElement.cpp b/third_party/WebKit/Source/core/html/HTMLMediaElement.cpp
index a3a195c2fcc3b2a7ca372c8415f8bea99985f949..7acb0d5b19c72ff20aeaada1d1a9d85ac1a98562 100644
--- a/third_party/WebKit/Source/core/html/HTMLMediaElement.cpp
+++ b/third_party/WebKit/Source/core/html/HTMLMediaElement.cpp
@@ -26,6 +26,7 @@
#include "core/html/HTMLMediaElement.h"
+#include <limits>
#include "bindings/core/v8/ExceptionState.h"
#include "bindings/core/v8/Microtask.h"
#include "bindings/core/v8/ScriptController.h"
@@ -68,6 +69,7 @@
#include "core/layout/LayoutMedia.h"
#include "core/layout/api/LayoutViewItem.h"
#include "core/layout/compositing/PaintLayerCompositor.h"
+#include "core/loader/DocumentLoader.h"
#include "core/loader/FrameLoader.h"
#include "core/loader/FrameLoaderClient.h"
#include "core/page/ChromeClient.h"
@@ -87,6 +89,7 @@
#include "public/platform/WebAudioSourceProvider.h"
#include "public/platform/WebContentDecryptionModule.h"
#include "public/platform/WebInbandTextTrack.h"
+#include "public/platform/WebLoadingBehaviorFlag.h"
#include "public/platform/WebMediaPlayerSource.h"
#include "public/platform/WebMediaStream.h"
#include "public/platform/modules/remoteplayback/WebRemotePlaybackAvailability.h"
@@ -97,7 +100,6 @@
#include "wtf/MathExtras.h"
#include "wtf/PtrUtil.h"
#include "wtf/text/CString.h"
-#include <limits>
#ifndef BLINK_MEDIA_LOG
#define BLINK_MEDIA_LOG DVLOG(3)
@@ -2317,6 +2319,9 @@ void HTMLMediaElement::playInternal() {
scheduleResolvePlayPromises();
}
+ document().loader()->didObserveLoadingBehavior(
Bryan McQuade 2017/03/08 18:03:22 one thing to note - this may prevent you from disc
Bryan McQuade 2017/03/08 18:10:11 charles and i just chatted - due to OOPIF, we thin
RyanSturm 2017/03/08 18:17:11 Agreed. I made the bad assumption that this was al
mlamouri (slow - plz ping) 2017/03/13 18:38:27 Instead of adding more plumbing, why not re-using
RyanSturm 2017/03/13 23:38:24 Thanks for the pointer. That looks like a better a
+ WebLoadingBehaviorFlag::WebLoadingBehaviorMediaPlayed);
+
m_canAutoplay = false;
setIgnorePreloadNone();

Powered by Google App Engine
This is Rietveld 408576698