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 973 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
984 // | 984 // |
985 // Be considerate to developers' consoles: features should only send | 985 // Be considerate to developers' consoles: features should only send |
986 // deprecation warnings when we're actively interested in removing them from | 986 // deprecation warnings when we're actively interested in removing them from |
987 // the platform. | 987 // the platform. |
988 // | 988 // |
989 // For shared workers and service workers, the ExecutionContext* overload | 989 // For shared workers and service workers, the ExecutionContext* overload |
990 // doesn't count the usage but only sends a console warning. | 990 // doesn't count the usage but only sends a console warning. |
991 static void countDeprecation(const LocalFrame*, Feature); | 991 static void countDeprecation(const LocalFrame*, Feature); |
992 static void countDeprecation(ExecutionContext*, Feature); | 992 static void countDeprecation(ExecutionContext*, Feature); |
993 static void countDeprecation(const Document&, Feature); | 993 static void countDeprecation(const Document&, Feature); |
994 | |
995 static void showDeprecationWarning(const LocalFrame*, CSSPropertyID); | |
994 // Use countDeprecationIfNotPrivateScript() instead of countDeprecation() | 996 // Use countDeprecationIfNotPrivateScript() instead of countDeprecation() |
995 // if you don't want to count metrics in private scripts. You should use | 997 // if you don't want to count metrics in private scripts. You should use |
996 // countDeprecationIfNotPrivateScript() in a binding layer. | 998 // countDeprecationIfNotPrivateScript() in a binding layer. |
997 static void countDeprecationIfNotPrivateScript(v8::Isolate*, ExecutionContex t*, Feature); | 999 static void countDeprecationIfNotPrivateScript(v8::Isolate*, ExecutionContex t*, Feature); |
998 static String deprecationMessage(Feature); | 1000 static String deprecationMessage(Feature); |
999 | 1001 |
1002 // CSSPropertyIDs that aren't deprecated don't have a deprecation message. | |
alancutter (OOO until 2018)
2016/01/20 00:58:27
// CSSPropertyIDs that aren't deprecated return an
| |
1003 static String deprecationMessage(CSSPropertyID); | |
1004 | |
1000 // Return whether the Feature was previously counted for this document. | 1005 // Return whether the Feature was previously counted for this document. |
1001 // NOTE: only for use in testing. | 1006 // NOTE: only for use in testing. |
1002 static bool isCounted(Document&, Feature); | 1007 static bool isCounted(Document&, Feature); |
1003 | 1008 |
1004 void didCommitLoad(); | 1009 void didCommitLoad(); |
1005 | 1010 |
1006 static UseCounter* getFrom(const Document*); | 1011 static UseCounter* getFrom(const Document*); |
1007 static UseCounter* getFrom(const CSSStyleSheet*); | 1012 static UseCounter* getFrom(const CSSStyleSheet*); |
1008 static UseCounter* getFrom(const StyleSheetContents*); | 1013 static UseCounter* getFrom(const StyleSheetContents*); |
1009 | 1014 |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1052 | 1057 |
1053 bool hasRecordedMeasurement(Feature feature) const { return m_countBits.hasR ecordedMeasurement(feature); } | 1058 bool hasRecordedMeasurement(Feature feature) const { return m_countBits.hasR ecordedMeasurement(feature); } |
1054 | 1059 |
1055 CountBits m_countBits; | 1060 CountBits m_countBits; |
1056 BitVector m_CSSFeatureBits; | 1061 BitVector m_CSSFeatureBits; |
1057 }; | 1062 }; |
1058 | 1063 |
1059 } // namespace blink | 1064 } // namespace blink |
1060 | 1065 |
1061 #endif // UseCounter_h | 1066 #endif // UseCounter_h |
OLD | NEW |