| 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 1470 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1481 // NOTE: only for use in testing. | 1481 // NOTE: only for use in testing. |
| 1482 static bool isCounted(Document&, Feature); | 1482 static bool isCounted(Document&, Feature); |
| 1483 // Return whether the CSSPropertyID was previously counted for this document. | 1483 // Return whether the CSSPropertyID was previously counted for this document. |
| 1484 // NOTE: only for use in testing. | 1484 // NOTE: only for use in testing. |
| 1485 static bool isCounted(Document&, const String&); | 1485 static bool isCounted(Document&, const String&); |
| 1486 bool isCounted(CSSPropertyID unresolvedProperty); | 1486 bool isCounted(CSSPropertyID unresolvedProperty); |
| 1487 | 1487 |
| 1488 // Invoked when a new document is loaded into the main frame of the page. | 1488 // Invoked when a new document is loaded into the main frame of the page. |
| 1489 void didCommitLoad(KURL); | 1489 void didCommitLoad(KURL); |
| 1490 | 1490 |
| 1491 static UseCounter* getFrom(const Document*); | |
| 1492 static UseCounter* getFrom(const CSSStyleSheet*); | |
| 1493 static UseCounter* getFrom(const StyleSheetContents*); | |
| 1494 | |
| 1495 static int mapCSSPropertyIdToCSSSampleIdForHistogram(CSSPropertyID); | 1491 static int mapCSSPropertyIdToCSSSampleIdForHistogram(CSSPropertyID); |
| 1496 | 1492 |
| 1497 // When muted, all calls to "count" functions are ignoed. May be nested. | 1493 // When muted, all calls to "count" functions are ignoed. May be nested. |
| 1498 void muteForInspector(); | 1494 void muteForInspector(); |
| 1499 void unmuteForInspector(); | 1495 void unmuteForInspector(); |
| 1500 | 1496 |
| 1501 void recordMeasurement(Feature); | 1497 void recordMeasurement(Feature); |
| 1502 | 1498 |
| 1503 // Return whether the feature has been seen since the last page load | 1499 // Return whether the feature has been seen since the last page load |
| 1504 // (except when muted). Does include features seen in documents which have | 1500 // (except when muted). Does include features seen in documents which have |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1538 // Tracks what features/properties need to be reported to the legacy | 1534 // Tracks what features/properties need to be reported to the legacy |
| 1539 // histograms. | 1535 // histograms. |
| 1540 BitVector m_featureBits; | 1536 BitVector m_featureBits; |
| 1541 BitVector m_CSSBits; | 1537 BitVector m_CSSBits; |
| 1542 } m_legacyCounter; | 1538 } m_legacyCounter; |
| 1543 }; | 1539 }; |
| 1544 | 1540 |
| 1545 } // namespace blink | 1541 } // namespace blink |
| 1546 | 1542 |
| 1547 #endif // UseCounter_h | 1543 #endif // UseCounter_h |
| OLD | NEW |