OLD | NEW |
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 935 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
946 // This doesn't count for ExecutionContexts for shared workers and service | 946 // This doesn't count for ExecutionContexts for shared workers and service |
947 // workers. | 947 // workers. |
948 static void count(const ExecutionContext*, Feature); | 948 static void count(const ExecutionContext*, Feature); |
949 // Use countIfNotPrivateScript() instead of count() if you don't want | 949 // Use countIfNotPrivateScript() instead of count() if you don't want |
950 // to count metrics in private scripts. You should use | 950 // to count metrics in private scripts. You should use |
951 // countIfNotPrivateScript() in a binding layer. | 951 // countIfNotPrivateScript() in a binding layer. |
952 static void countIfNotPrivateScript(v8::Isolate*, const Frame*, Feature); | 952 static void countIfNotPrivateScript(v8::Isolate*, const Frame*, Feature); |
953 static void countIfNotPrivateScript(v8::Isolate*, const Document&, Feature); | 953 static void countIfNotPrivateScript(v8::Isolate*, const Document&, Feature); |
954 static void countIfNotPrivateScript(v8::Isolate*, const ExecutionContext*, F
eature); | 954 static void countIfNotPrivateScript(v8::Isolate*, const ExecutionContext*, F
eature); |
955 | 955 |
956 void count(CSSParserContext, CSSPropertyID); | 956 void count(CSSParserMode, CSSPropertyID); |
957 void count(Feature); | 957 void count(Feature); |
958 | 958 |
959 // "countDeprecation" sets the bit for this feature to 1, and sends a deprec
ation | 959 // "countDeprecation" sets the bit for this feature to 1, and sends a deprec
ation |
960 // warning to the console. Repeated calls are ignored. | 960 // warning to the console. Repeated calls are ignored. |
961 // | 961 // |
962 // Be considerate to developers' consoles: features should only send | 962 // Be considerate to developers' consoles: features should only send |
963 // deprecation warnings when we're actively interested in removing them from | 963 // deprecation warnings when we're actively interested in removing them from |
964 // the platform. | 964 // the platform. |
965 // | 965 // |
966 // For shared workers and service workers, the ExecutionContext* overload | 966 // For shared workers and service workers, the ExecutionContext* overload |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1029 | 1029 |
1030 bool hasRecordedMeasurement(Feature feature) const { return m_countBits.hasR
ecordedMeasurement(feature); } | 1030 bool hasRecordedMeasurement(Feature feature) const { return m_countBits.hasR
ecordedMeasurement(feature); } |
1031 | 1031 |
1032 CountBits m_countBits; | 1032 CountBits m_countBits; |
1033 BitVector m_CSSFeatureBits; | 1033 BitVector m_CSSFeatureBits; |
1034 }; | 1034 }; |
1035 | 1035 |
1036 } // namespace blink | 1036 } // namespace blink |
1037 | 1037 |
1038 #endif // UseCounter_h | 1038 #endif // UseCounter_h |
OLD | NEW |