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

Unified Diff: Source/core/frame/UseCounter.h

Issue 707333003: Update UsageCounter methods to be callable on Frames. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Add missing null check Created 6 years, 1 month 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
« no previous file with comments | « Source/core/frame/LocalDOMWindow.cpp ('k') | Source/core/frame/UseCounter.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/frame/UseCounter.h
diff --git a/Source/core/frame/UseCounter.h b/Source/core/frame/UseCounter.h
index 69673c49d8b3646d41a2a20199978182e429a794..0b384da2dfc3cbda189af154b739815b09519941 100644
--- a/Source/core/frame/UseCounter.h
+++ b/Source/core/frame/UseCounter.h
@@ -37,9 +37,10 @@
namespace blink {
class CSSStyleSheet;
-class LocalDOMWindow;
class Document;
class ExecutionContext;
+class Frame;
+class LocalFrame;
class StyleSheetContents;
// UseCounter is used for counting the number of times features of
@@ -568,6 +569,7 @@ public:
};
// "count" sets the bit for this feature to 1. Repeated calls are ignored.
+ static void count(const Frame*, Feature);
static void count(const Document&, Feature);
// This doesn't count for ExecutionContexts for shared workers and service
// workers.
@@ -575,6 +577,7 @@ public:
// Use countIfNotPrivateScript() instead of count() if you don't want
// to count metrics in private scripts. You should use
// countIfNotPrivateScript() in a binding layer.
+ static void countIfNotPrivateScript(v8::Isolate*, const Frame*, Feature);
static void countIfNotPrivateScript(v8::Isolate*, const Document&, Feature);
static void countIfNotPrivateScript(v8::Isolate*, const ExecutionContext*, Feature);
@@ -590,7 +593,7 @@ public:
//
// The ExecutionContext* overload doesn't work for shared workers and
// service workers.
- static void countDeprecation(const LocalDOMWindow*, Feature);
+ static void countDeprecation(const LocalFrame*, Feature);
static void countDeprecation(ExecutionContext*, Feature);
static void countDeprecation(const Document&, Feature);
// Use countDeprecationIfNotPrivateScript() instead of countDeprecation()
« no previous file with comments | « Source/core/frame/LocalDOMWindow.cpp ('k') | Source/core/frame/UseCounter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698