| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef Deprecation_h | 5 #ifndef Deprecation_h |
| 6 #define Deprecation_h | 6 #define Deprecation_h |
| 7 | 7 |
| 8 #include "core/CSSPropertyNames.h" | 8 #include "core/CSSPropertyNames.h" |
| 9 #include "core/CoreExport.h" | 9 #include "core/CoreExport.h" |
| 10 #include "core/frame/UseCounter.h" | 10 #include "core/frame/UseCounter.h" |
| (...skipping 12 matching lines...) Expand all Loading... |
| 23 Deprecation(); | 23 Deprecation(); |
| 24 ~Deprecation(); | 24 ~Deprecation(); |
| 25 | 25 |
| 26 static void warnOnDeprecatedProperties(const LocalFrame*, | 26 static void warnOnDeprecatedProperties(const LocalFrame*, |
| 27 CSSPropertyID unresolvedProperty); | 27 CSSPropertyID unresolvedProperty); |
| 28 void clearSuppression(); | 28 void clearSuppression(); |
| 29 | 29 |
| 30 void muteForInspector(); | 30 void muteForInspector(); |
| 31 void unmuteForInspector(); | 31 void unmuteForInspector(); |
| 32 | 32 |
| 33 // "countDeprecation" sets the bit for this feature to 1, and sends a deprecat
ion | 33 // "countDeprecation" sets the bit for this feature to 1, and sends a |
| 34 // warning to the console. Repeated calls are ignored. | 34 // deprecation warning to the console. Repeated calls are ignored. |
| 35 // | 35 // |
| 36 // Be considerate to developers' consoles: features should only send | 36 // Be considerate to developers' consoles: features should only send |
| 37 // deprecation warnings when we're actively interested in removing them from | 37 // deprecation warnings when we're actively interested in removing them from |
| 38 // the platform. | 38 // the platform. |
| 39 // | 39 // |
| 40 // For shared workers and service workers, the ExecutionContext* overload | 40 // For shared workers and service workers, the ExecutionContext* overload |
| 41 // doesn't count the usage but only sends a console warning. | 41 // doesn't count the usage but only sends a console warning. |
| 42 static void countDeprecation(const LocalFrame*, UseCounter::Feature); | 42 static void countDeprecation(const LocalFrame*, UseCounter::Feature); |
| 43 static void countDeprecation(ExecutionContext*, UseCounter::Feature); | 43 static void countDeprecation(ExecutionContext*, UseCounter::Feature); |
| 44 static void countDeprecation(const Document&, UseCounter::Feature); | 44 static void countDeprecation(const Document&, UseCounter::Feature); |
| (...skipping 19 matching lines...) Expand all Loading... |
| 64 // CSSPropertyIDs that aren't deprecated return an empty string. | 64 // CSSPropertyIDs that aren't deprecated return an empty string. |
| 65 static String deprecationMessage(CSSPropertyID unresolvedProperty); | 65 static String deprecationMessage(CSSPropertyID unresolvedProperty); |
| 66 | 66 |
| 67 BitVector m_cssPropertyDeprecationBits; | 67 BitVector m_cssPropertyDeprecationBits; |
| 68 unsigned m_muteCount; | 68 unsigned m_muteCount; |
| 69 }; | 69 }; |
| 70 | 70 |
| 71 } // namespace blink | 71 } // namespace blink |
| 72 | 72 |
| 73 #endif // Deprecation_h | 73 #endif // Deprecation_h |
| OLD | NEW |