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 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
88 MaxAttribute, | 88 MaxAttribute, |
89 MinAttribute, | 89 MinAttribute, |
90 PatternAttribute, | 90 PatternAttribute, |
91 PlaceholderAttribute, | 91 PlaceholderAttribute, |
92 PrecisionAttribute, | 92 PrecisionAttribute, |
93 PrefixedDirectoryAttribute, | 93 PrefixedDirectoryAttribute, |
94 PrefixedSpeechAttribute, | 94 PrefixedSpeechAttribute, |
95 RequiredAttribute, | 95 RequiredAttribute, |
96 ResultsAttribute, | 96 ResultsAttribute, |
97 StepAttribute, | 97 StepAttribute, |
| 98 PageVisits, |
98 // Add new features above this line. Don't change assigned numbers of ea
ch items. | 99 // Add new features above this line. Don't change assigned numbers of ea
ch items. |
99 NumberOfFeatures, // This enum value must be last. | 100 NumberOfFeatures, // This enum value must be last. |
100 }; | 101 }; |
101 | 102 |
102 static void observe(Document*, Feature); | 103 static void observe(Document*, Feature); |
103 static void observe(DOMWindow*, Feature); | 104 static void observe(DOMWindow*, Feature); |
| 105 void didCommitLoad(); |
104 | 106 |
105 private: | 107 private: |
106 void didObserve(Feature feature) | 108 void didObserve(Feature feature) |
107 { | 109 { |
108 ASSERT(feature != PageDestruction); // PageDestruction is reserved as a
scaling factor. | 110 ASSERT(feature != PageDestruction); // PageDestruction is reserved as a
scaling factor. |
109 ASSERT(feature < NumberOfFeatures); | 111 ASSERT(feature < NumberOfFeatures); |
110 if (!m_featureBits) { | 112 if (!m_featureBits) { |
111 m_featureBits = adoptPtr(new BitVector(NumberOfFeatures)); | 113 m_featureBits = adoptPtr(new BitVector(NumberOfFeatures)); |
112 m_featureBits->clearAll(); | 114 m_featureBits->clearAll(); |
113 } | 115 } |
114 m_featureBits->quickSet(feature); | 116 m_featureBits->quickSet(feature); |
115 } | 117 } |
116 | 118 |
| 119 void updateMeasurements(); |
| 120 |
117 OwnPtr<BitVector> m_featureBits; | 121 OwnPtr<BitVector> m_featureBits; |
118 }; | 122 }; |
119 | 123 |
120 } // namespace WebCore | 124 } // namespace WebCore |
121 | 125 |
122 #endif // FeatureObserver_h | 126 #endif // FeatureObserver_h |
OLD | NEW |