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 636 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
647 void count(CSSParserContext, CSSPropertyID); | 647 void count(CSSParserContext, CSSPropertyID); |
648 void count(Feature); | 648 void count(Feature); |
649 | 649 |
650 // "countDeprecation" sets the bit for this feature to 1, and sends a deprec
ation | 650 // "countDeprecation" sets the bit for this feature to 1, and sends a deprec
ation |
651 // warning to the console. Repeated calls are ignored. | 651 // warning to the console. Repeated calls are ignored. |
652 // | 652 // |
653 // Be considerate to developers' consoles: features should only send | 653 // Be considerate to developers' consoles: features should only send |
654 // deprecation warnings when we're actively interested in removing them from | 654 // deprecation warnings when we're actively interested in removing them from |
655 // the platform. | 655 // the platform. |
656 // | 656 // |
657 // The ExecutionContext* overload doesn't work for shared workers and | 657 // For shared workers and service workers, the ExecutionContext* overload |
658 // service workers. | 658 // doesn't count the usage but only sends a console warning. |
659 static void countDeprecation(const LocalFrame*, Feature); | 659 static void countDeprecation(const LocalFrame*, Feature); |
660 static void countDeprecation(ExecutionContext*, Feature); | 660 static void countDeprecation(ExecutionContext*, Feature); |
661 static void countDeprecation(const Document&, Feature); | 661 static void countDeprecation(const Document&, Feature); |
662 // Use countDeprecationIfNotPrivateScript() instead of countDeprecation() | 662 // Use countDeprecationIfNotPrivateScript() instead of countDeprecation() |
663 // if you don't want to count metrics in private scripts. You should use | 663 // if you don't want to count metrics in private scripts. You should use |
664 // countDeprecationIfNotPrivateScript() in a binding layer. | 664 // countDeprecationIfNotPrivateScript() in a binding layer. |
665 static void countDeprecationIfNotPrivateScript(v8::Isolate*, ExecutionContex
t*, Feature); | 665 static void countDeprecationIfNotPrivateScript(v8::Isolate*, ExecutionContex
t*, Feature); |
666 String deprecationMessage(Feature); | 666 static String deprecationMessage(Feature); |
667 | 667 |
668 void didCommitLoad(); | 668 void didCommitLoad(); |
669 | 669 |
670 static UseCounter* getFrom(const Document*); | 670 static UseCounter* getFrom(const Document*); |
671 static UseCounter* getFrom(const CSSStyleSheet*); | 671 static UseCounter* getFrom(const CSSStyleSheet*); |
672 static UseCounter* getFrom(const StyleSheetContents*); | 672 static UseCounter* getFrom(const StyleSheetContents*); |
673 | 673 |
674 static int mapCSSPropertyIdToCSSSampleIdForHistogram(int id); | 674 static int mapCSSPropertyIdToCSSSampleIdForHistogram(int id); |
675 | 675 |
676 static void muteForInspector(); | 676 static void muteForInspector(); |
(...skipping 22 matching lines...) Expand all Loading... |
699 | 699 |
700 void updateMeasurements(); | 700 void updateMeasurements(); |
701 | 701 |
702 OwnPtr<BitVector> m_countBits; | 702 OwnPtr<BitVector> m_countBits; |
703 BitVector m_CSSFeatureBits; | 703 BitVector m_CSSFeatureBits; |
704 }; | 704 }; |
705 | 705 |
706 } // namespace blink | 706 } // namespace blink |
707 | 707 |
708 #endif // UseCounter_h | 708 #endif // UseCounter_h |
OLD | NEW |