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

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, 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 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 1100 matching lines...) Expand 10 before | Expand all | Expand 10 after
1111 void count(CSSParserMode, CSSPropertyID); 1111 void count(CSSParserMode, CSSPropertyID);
1112 void count(Feature); 1112 void count(Feature);
1113 1113
1114 // Count only features if they're being used in an iframe which does not 1114 // Count only features if they're being used in an iframe which does not
1115 // have script access into the top level document. 1115 // have script access into the top level document.
1116 static void countCrossOriginIframe(const Document&, Feature); 1116 static void countCrossOriginIframe(const Document&, Feature);
1117 1117
1118 // Return whether the Feature was previously counted for this document. 1118 // Return whether the Feature was previously counted for this document.
1119 // NOTE: only for use in testing. 1119 // NOTE: only for use in testing.
1120 static bool isCounted(Document&, Feature); 1120 static bool isCounted(Document&, Feature);
1121 // Return whether the CSSPropertyID was previously counted for this document .
1122 // NOTE: only for use in testing.
1123 static bool isCounted(Document&, const String&);
1124 bool isCounted(CSSPropertyID);
1121 1125
1122 void didCommitLoad(); 1126 void didCommitLoad();
1123 1127
1124 static UseCounter* getFrom(const Document*); 1128 static UseCounter* getFrom(const Document*);
1125 static UseCounter* getFrom(const CSSStyleSheet*); 1129 static UseCounter* getFrom(const CSSStyleSheet*);
1126 static UseCounter* getFrom(const StyleSheetContents*); 1130 static UseCounter* getFrom(const StyleSheetContents*);
1127 1131
1128 static int mapCSSPropertyIdToCSSSampleIdForHistogram(int id); 1132 static int mapCSSPropertyIdToCSSSampleIdForHistogram(int id);
1129 1133
1130 static void muteForInspector(); 1134 static void muteForInspector();
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
1170 friend class UseCounterTest; 1174 friend class UseCounterTest;
1171 static int m_muteCount; 1175 static int m_muteCount;
1172 1176
1173 CountBits m_countBits; 1177 CountBits m_countBits;
1174 BitVector m_CSSFeatureBits; 1178 BitVector m_CSSFeatureBits;
1175 }; 1179 };
1176 1180
1177 } // namespace blink 1181 } // namespace blink
1178 1182
1179 #endif // UseCounter_h 1183 #endif // UseCounter_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698