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

Side by Side Diff: third_party/WebKit/Source/core/frame/UseCounter.h

Issue 1711703002: Add internals.isCSSPropertyUseCounted functionality (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2012 Google, Inc. All rights reserved. 2 * Copyright (C) 2012 Google, Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 1102 matching lines...) Expand 10 before | Expand all | Expand 10 after
1113 void count(CSSParserMode, CSSPropertyID); 1113 void count(CSSParserMode, CSSPropertyID);
1114 void count(Feature); 1114 void count(Feature);
1115 1115
1116 // Count only features if they're being used in an iframe which does not 1116 // Count only features if they're being used in an iframe which does not
1117 // have script access into the top level document. 1117 // have script access into the top level document.
1118 static void countCrossOriginIframe(const Document&, Feature); 1118 static void countCrossOriginIframe(const Document&, Feature);
1119 1119
1120 // Return whether the Feature was previously counted for this document. 1120 // Return whether the Feature was previously counted for this document.
1121 // NOTE: only for use in testing. 1121 // NOTE: only for use in testing.
1122 static bool isCounted(Document&, Feature); 1122 static bool isCounted(Document&, Feature);
1123 // Return whether the CSSPropertyID was previously counted for this document .
1124 // NOTE: only for use in testing.
1125 static bool isCounted(Document&, CSSPropertyID);
1126 bool isCounted(CSSPropertyID);
1123 1127
1124 void didCommitLoad(); 1128 void didCommitLoad();
1125 1129
1126 static UseCounter* getFrom(const Document*); 1130 static UseCounter* getFrom(const Document*);
1127 static UseCounter* getFrom(const CSSStyleSheet*); 1131 static UseCounter* getFrom(const CSSStyleSheet*);
1128 static UseCounter* getFrom(const StyleSheetContents*); 1132 static UseCounter* getFrom(const StyleSheetContents*);
1129 1133
1130 static int mapCSSPropertyIdToCSSSampleIdForHistogram(int id); 1134 static int mapCSSPropertyIdToCSSSampleIdForHistogram(int id);
1131 1135
1132 static void muteForInspector(); 1136 static void muteForInspector();
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
1172 friend class UseCounterTest; 1176 friend class UseCounterTest;
1173 static int m_muteCount; 1177 static int m_muteCount;
1174 1178
1175 CountBits m_countBits; 1179 CountBits m_countBits;
1176 BitVector m_CSSFeatureBits; 1180 BitVector m_CSSFeatureBits;
1177 }; 1181 };
1178 1182
1179 } // namespace blink 1183 } // namespace blink
1180 1184
1181 #endif // UseCounter_h 1185 #endif // UseCounter_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698