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

Unified Diff: Source/core/dom/Element.cpp

Issue 986583002: Collect host of Web Component usage to send to RAPPOR (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 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: Source/core/dom/Element.cpp
diff --git a/Source/core/dom/Element.cpp b/Source/core/dom/Element.cpp
index 2607f8068404cfcac097b193fdb630258c627a04..7e842088582a0b1476d94c2c57863d1d610d46c2 100644
--- a/Source/core/dom/Element.cpp
+++ b/Source/core/dom/Element.cpp
@@ -87,6 +87,7 @@
#include "core/frame/PinchViewport.h"
#include "core/frame/ScrollToOptions.h"
#include "core/frame/Settings.h"
+#include "core/frame/UseByOriginCounter.h"
#include "core/frame/UseCounter.h"
#include "core/frame/csp/ContentSecurityPolicy.h"
#include "core/html/ClassList.h"
@@ -1771,6 +1772,12 @@ CustomElementDefinition* Element::customElementDefinition() const
return nullptr;
}
+PassRefPtrWillBeRawPtr<ShadowRoot> Element::createShadowRoot(ScriptState* scriptState, ExceptionState& exceptionState)
+{
+ UseByOriginCounter::count(scriptState, document(), UseByOriginCounter::Feature::ElementCreateShadowRoot);
+ return createShadowRoot(exceptionState);
+}
+
PassRefPtrWillBeRawPtr<ShadowRoot> Element::createShadowRoot(ExceptionState& exceptionState)
{
if (alwaysCreateClosedShadowRoot())

Powered by Google App Engine
This is Rietveld 408576698