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

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

Issue 1866343002: Measure usage of image/media/plugin/text documents (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 8 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/MediaDocument.cpp
diff --git a/third_party/WebKit/Source/core/html/MediaDocument.cpp b/third_party/WebKit/Source/core/html/MediaDocument.cpp
index 93709e9b3db5ebedb142152e612abb88c6447126..3c758c3c1727d260beeec4bf68dfd4883dee82a9 100644
--- a/third_party/WebKit/Source/core/html/MediaDocument.cpp
+++ b/third_party/WebKit/Source/core/html/MediaDocument.cpp
@@ -34,6 +34,7 @@
#include "core/events/EventListener.h"
#include "core/events/KeyboardEvent.h"
#include "core/frame/LocalFrame.h"
+#include "core/frame/UseCounter.h"
#include "core/html/HTMLAnchorElement.h"
#include "core/html/HTMLBodyElement.h"
#include "core/html/HTMLContentElement.h"
@@ -234,6 +235,9 @@ MediaDocument::MediaDocument(const DocumentInit& initializer)
{
setCompatibilityMode(QuirksMode);
lockCompatibilityMode();
+ UseCounter::count(*this, UseCounter::MediaDocument);
+ if (ownerElement())
+ UseCounter::count(*this, UseCounter::MediaDocumentInFrame);
}
DocumentParser* MediaDocument::createParser()
« no previous file with comments | « third_party/WebKit/Source/core/html/ImageDocument.cpp ('k') | third_party/WebKit/Source/core/html/PluginDocument.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698