| 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 18 matching lines...) Expand all Loading... |
| 29 #include "core/CSSPropertyNames.h" | 29 #include "core/CSSPropertyNames.h" |
| 30 #include "wtf/BitVector.h" | 30 #include "wtf/BitVector.h" |
| 31 #include "wtf/Noncopyable.h" | 31 #include "wtf/Noncopyable.h" |
| 32 #include "wtf/OwnPtr.h" | 32 #include "wtf/OwnPtr.h" |
| 33 #include "wtf/PassOwnPtr.h" | 33 #include "wtf/PassOwnPtr.h" |
| 34 #include "wtf/text/WTFString.h" | 34 #include "wtf/text/WTFString.h" |
| 35 | 35 |
| 36 namespace WebCore { | 36 namespace WebCore { |
| 37 | 37 |
| 38 class CSSStyleSheet; | 38 class CSSStyleSheet; |
| 39 class DOMWindow; | 39 class LocalDOMWindow; |
| 40 class Document; | 40 class Document; |
| 41 class ExecutionContext; | 41 class ExecutionContext; |
| 42 class StyleSheetContents; | 42 class StyleSheetContents; |
| 43 | 43 |
| 44 // UseCounter is used for counting the number of times features of | 44 // UseCounter is used for counting the number of times features of |
| 45 // Blink are used on real web pages and help us know commonly | 45 // Blink are used on real web pages and help us know commonly |
| 46 // features are used and thus when it's safe to remove or change them. | 46 // features are used and thus when it's safe to remove or change them. |
| 47 // | 47 // |
| 48 // The Chromium Content layer controls what is done with this data. | 48 // The Chromium Content layer controls what is done with this data. |
| 49 // For instance, in Google Chrome, these counts are submitted | 49 // For instance, in Google Chrome, these counts are submitted |
| (...skipping 436 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 486 | 486 |
| 487 // "countDeprecation" sets the bit for this feature to 1, and sends a deprec
ation | 487 // "countDeprecation" sets the bit for this feature to 1, and sends a deprec
ation |
| 488 // warning to the console. Repeated calls are ignored. | 488 // warning to the console. Repeated calls are ignored. |
| 489 // | 489 // |
| 490 // Be considerate to developers' consoles: features should only send | 490 // Be considerate to developers' consoles: features should only send |
| 491 // deprecation warnings when we're actively interested in removing them from | 491 // deprecation warnings when we're actively interested in removing them from |
| 492 // the platform. | 492 // the platform. |
| 493 // | 493 // |
| 494 // The ExecutionContext* overload doesn't work for shared workers and | 494 // The ExecutionContext* overload doesn't work for shared workers and |
| 495 // service workers. | 495 // service workers. |
| 496 static void countDeprecation(const DOMWindow*, Feature); | 496 static void countDeprecation(const LocalDOMWindow*, Feature); |
| 497 static void countDeprecation(ExecutionContext*, Feature); | 497 static void countDeprecation(ExecutionContext*, Feature); |
| 498 static void countDeprecation(const Document&, Feature); | 498 static void countDeprecation(const Document&, Feature); |
| 499 String deprecationMessage(Feature); | 499 String deprecationMessage(Feature); |
| 500 | 500 |
| 501 void didCommitLoad(); | 501 void didCommitLoad(); |
| 502 | 502 |
| 503 static UseCounter* getFrom(const Document*); | 503 static UseCounter* getFrom(const Document*); |
| 504 static UseCounter* getFrom(const CSSStyleSheet*); | 504 static UseCounter* getFrom(const CSSStyleSheet*); |
| 505 static UseCounter* getFrom(const StyleSheetContents*); | 505 static UseCounter* getFrom(const StyleSheetContents*); |
| 506 | 506 |
| (...skipping 25 matching lines...) Expand all Loading... |
| 532 | 532 |
| 533 void updateMeasurements(); | 533 void updateMeasurements(); |
| 534 | 534 |
| 535 OwnPtr<BitVector> m_countBits; | 535 OwnPtr<BitVector> m_countBits; |
| 536 BitVector m_CSSFeatureBits; | 536 BitVector m_CSSFeatureBits; |
| 537 }; | 537 }; |
| 538 | 538 |
| 539 } // namespace WebCore | 539 } // namespace WebCore |
| 540 | 540 |
| 541 #endif // UseCounter_h | 541 #endif // UseCounter_h |
| OLD | NEW |