Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(108)

Side by Side Diff: Source/core/frame/UseCounter.h

Issue 729393002: Auto generate UseCounter::Feature enum from an .in file (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
11 * documentation and/or other materials provided with the distribution. 11 * documentation and/or other materials provided with the distribution.
12 * 12 *
13 * THIS SOFTWARE IS PROVIDED BY GOOGLE INC. ``AS IS'' AND ANY 13 * THIS SOFTWARE IS PROVIDED BY GOOGLE INC. ``AS IS'' AND ANY
14 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 14 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
15 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 15 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
16 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR 16 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR
17 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 17 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
18 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 18 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
19 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 19 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
20 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY 20 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
21 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 21 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
22 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 22 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
23 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 23 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
24 */ 24 */
25 25
26 #ifndef UseCounter_h 26 #ifndef UseCounter_h
27 #define UseCounter_h 27 #define UseCounter_h
28 28
29 #include "core/CSSPropertyNames.h" 29 #include "core/CSSPropertyNames.h"
30 #include "core/UseCounterGenerated.h"
30 #include "wtf/BitVector.h" 31 #include "wtf/BitVector.h"
31 #include "wtf/Noncopyable.h" 32 #include "wtf/Noncopyable.h"
32 #include "wtf/OwnPtr.h" 33 #include "wtf/OwnPtr.h"
33 #include "wtf/PassOwnPtr.h" 34 #include "wtf/PassOwnPtr.h"
34 #include "wtf/text/WTFString.h" 35 #include "wtf/text/WTFString.h"
35 #include <v8.h> 36 #include <v8.h>
36 37
37 namespace blink { 38 namespace blink {
38 39
39 class CSSStyleSheet; 40 class CSSStyleSheet;
40 class Document; 41 class Document;
41 class ExecutionContext; 42 class ExecutionContext;
42 class Frame; 43 class Frame;
43 class LocalFrame; 44 class LocalFrame;
44 class StyleSheetContents; 45 class StyleSheetContents;
45 46
46 // UseCounter is used for counting the number of times features of 47 // UseCounter is used for counting the number of times features of
47 // Blink are used on real web pages and help us know commonly 48 // Blink are used on real web pages and help us know commonly
48 // features are used and thus when it's safe to remove or change them. 49 // features are used and thus when it's safe to remove or change them.
49 // 50 //
50 // The Chromium Content layer controls what is done with this data. 51 // The Chromium Content layer controls what is done with this data.
51 // For instance, in Google Chrome, these counts are submitted 52 // For instance, in Google Chrome, these counts are submitted
52 // anonymously through the Histogram recording system in Chrome 53 // anonymously through the Histogram recording system in Chrome
53 // for users who opt-in to "Usage Statistics" submission 54 // for users who opt-in to "Usage Statistics" submission
54 // during their install of Google Chrome: 55 // during their install of Google Chrome:
55 // http://www.google.com/chrome/intl/en/privacy.html 56 // http://www.google.com/chrome/intl/en/privacy.html
56 57
57 class UseCounter { 58 class UseCounter : public UseCounterGenerated {
haraken 2014/11/24 09:38:49 Add final.
58 WTF_MAKE_NONCOPYABLE(UseCounter); 59 WTF_MAKE_NONCOPYABLE(UseCounter);
59 public: 60 public:
60 UseCounter(); 61 UseCounter();
61 ~UseCounter(); 62 ~UseCounter();
62 63
63 enum Feature {
64 // Do not change assigned numbers of existing items: add new features
65 // to the end of the list.
66 PageDestruction = 0,
67 PrefixedIndexedDB = 3,
68 WorkerStart = 4,
69 SharedWorkerStart = 5,
70 UnprefixedIndexedDB = 9,
71 OpenWebDatabase = 10,
72 UnprefixedRequestAnimationFrame = 13,
73 PrefixedRequestAnimationFrame = 14,
74 ContentSecurityPolicy = 15,
75 ContentSecurityPolicyReportOnly = 16,
76 PrefixedTransitionEndEvent = 18,
77 UnprefixedTransitionEndEvent = 19,
78 PrefixedAndUnprefixedTransitionEndEvent = 20,
79 AutoFocusAttribute = 21,
80 DataListElement = 23,
81 FormAttribute = 24,
82 IncrementalAttribute = 25,
83 InputTypeColor = 26,
84 InputTypeDate = 27,
85 InputTypeDateTimeFallback = 29,
86 InputTypeDateTimeLocal = 30,
87 InputTypeEmail = 31,
88 InputTypeMonth = 32,
89 InputTypeNumber = 33,
90 InputTypeRange = 34,
91 InputTypeSearch = 35,
92 InputTypeTel = 36,
93 InputTypeTime = 37,
94 InputTypeURL = 38,
95 InputTypeWeek = 39,
96 InputTypeWeekFallback = 40,
97 ListAttribute = 41,
98 MaxAttribute = 42,
99 MinAttribute = 43,
100 PatternAttribute = 44,
101 PlaceholderAttribute = 45,
102 PrefixedDirectoryAttribute = 47,
103 RequiredAttribute = 49,
104 ResultsAttribute = 50,
105 StepAttribute = 51,
106 PageVisits = 52,
107 HTMLMarqueeElement = 53,
108 Reflection = 55,
109 PrefixedStorageInfo = 57,
110 XFrameOptions = 58,
111 XFrameOptionsSameOrigin = 59,
112 XFrameOptionsSameOriginWithBadAncestorChain = 60,
113 DeprecatedFlexboxWebContent = 61,
114 DeprecatedFlexboxChrome = 62,
115 DeprecatedFlexboxChromeExtension = 63,
116 UnprefixedPerformanceTimeline = 65,
117 UnprefixedUserTiming = 67,
118 WindowEvent = 69,
119 ContentSecurityPolicyWithBaseElement = 70,
120 PrefixedMediaAddKey = 71,
121 PrefixedMediaGenerateKeyRequest = 72,
122 DocumentClear = 74,
123 XMLDocument = 77,
124 XSLProcessingInstruction = 78,
125 XSLTProcessor = 79,
126 SVGSwitchElement = 80,
127 DocumentAll = 83,
128 FormElement = 84,
129 DemotedFormElement = 85,
130 SVGAnimationElement = 90,
131 KeyboardEventKeyLocation = 91,
132 LineClamp = 96,
133 SubFrameBeforeUnloadRegistered = 97,
134 SubFrameBeforeUnloadFired = 98,
135 ConsoleMarkTimeline = 102,
136 ElementGetAttributeNode = 107,
137 ElementSetAttributeNode = 108,
138 ElementRemoveAttributeNode = 109,
139 ElementGetAttributeNodeNS = 110,
140 DocumentCreateAttribute = 111,
141 DocumentCreateAttributeNS = 112,
142 DocumentCreateCDATASection = 113, // Removed from DOM4.
143 DocumentInputEncoding = 114, // Removed from DOM4.
144 DocumentXMLEncoding = 115, // Removed from DOM4.
145 DocumentXMLStandalone = 116, // Removed from DOM4.
146 DocumentXMLVersion = 117, // Removed from DOM4.
147 NodeIsSameNode = 118, // Removed from DOM4.
148 NodeNamespaceURI = 120, // Removed from DOM4.
149 NodeLocalName = 122, // Removed from DOM4.
150 NavigatorProductSub = 123,
151 NavigatorVendor = 124,
152 NavigatorVendorSub = 125,
153 FileError = 126,
154 DocumentCharset = 127, // Documented as IE extensions = 0, from KHTML da ys.
155 PrefixedAnimationEndEvent = 128,
156 UnprefixedAnimationEndEvent = 129,
157 PrefixedAndUnprefixedAnimationEndEvent = 130,
158 PrefixedAnimationStartEvent = 131,
159 UnprefixedAnimationStartEvent = 132,
160 PrefixedAndUnprefixedAnimationStartEvent = 133,
161 PrefixedAnimationIterationEvent = 134,
162 UnprefixedAnimationIterationEvent = 135,
163 PrefixedAndUnprefixedAnimationIterationEvent = 136,
164 EventReturnValue = 137, // Legacy IE extension.
165 SVGSVGElement = 138,
166 InsertAdjacentText = 140,
167 InsertAdjacentElement = 141,
168 HasAttributes = 142,
169 DOMSubtreeModifiedEvent = 143,
170 DOMNodeInsertedEvent = 144,
171 DOMNodeRemovedEvent = 145,
172 DOMNodeRemovedFromDocumentEvent = 146,
173 DOMNodeInsertedIntoDocumentEvent = 147,
174 DOMCharacterDataModifiedEvent = 148,
175 DocumentAllLegacyCall = 150,
176 HTMLEmbedElementLegacyCall = 152,
177 HTMLObjectElementLegacyCall = 153,
178 GetMatchedCSSRules = 155,
179 AttributeOwnerElement = 160,
180 AttributeSpecified = 162,
181 PrefixedAudioDecodedByteCount = 164,
182 PrefixedVideoDecodedByteCount = 165,
183 PrefixedVideoSupportsFullscreen = 166,
184 PrefixedVideoDisplayingFullscreen = 167,
185 PrefixedVideoEnterFullscreen = 168,
186 PrefixedVideoExitFullscreen = 169,
187 PrefixedVideoEnterFullScreen = 170,
188 PrefixedVideoExitFullScreen = 171,
189 PrefixedVideoDecodedFrameCount = 172,
190 PrefixedVideoDroppedFrameCount = 173,
191 PrefixedElementRequestFullscreen = 176,
192 PrefixedElementRequestFullScreen = 177,
193 BarPropLocationbar = 178,
194 BarPropMenubar = 179,
195 BarPropPersonalbar = 180,
196 BarPropScrollbars = 181,
197 BarPropStatusbar = 182,
198 BarPropToolbar = 183,
199 InputTypeEmailMultiple = 184,
200 InputTypeEmailMaxLength = 185,
201 InputTypeEmailMultipleMaxLength = 186,
202 InputTypeText = 190,
203 InputTypeTextMaxLength = 191,
204 InputTypePassword = 192,
205 InputTypePasswordMaxLength = 193,
206 ShowModalDialog = 195,
207 PrefixedPageVisibility = 196,
208 CSSStyleSheetInsertRuleOptionalArg = 198, // Inconsistent with the speci fication and other browsers.
209 DocumentBeforeUnloadRegistered = 200,
210 DocumentBeforeUnloadFired = 201,
211 DocumentUnloadRegistered = 202,
212 DocumentUnloadFired = 203,
213 SVGLocatableNearestViewportElement = 204,
214 SVGLocatableFarthestViewportElement = 205,
215 OverflowChangedEvent = 208,
216 SVGPointMatrixTransform = 209,
217 DOMFocusInOutEvent = 211,
218 FileGetLastModifiedDate = 212,
219 HTMLElementInnerText = 213,
220 HTMLElementOuterText = 214,
221 ReplaceDocumentViaJavaScriptURL = 215,
222 ElementSetAttributeNodeNS = 216, // Removed from DOM4.
223 ElementPrefixedMatchesSelector = 217,
224 CSSStyleSheetRules = 219,
225 CSSStyleSheetAddRule = 220,
226 CSSStyleSheetRemoveRule = 221,
227 // The above items are available in M33 branch.
228
229 InitMessageEvent = 222,
230 PrefixedMediaCancelKeyRequest = 229,
231 DOMImplementationHasFeature = 230,
232 DOMImplementationHasFeatureReturnFalse = 231,
233 CanPlayTypeKeySystem = 232,
234 PrefixedDevicePixelRatioMediaFeature = 233,
235 PrefixedMaxDevicePixelRatioMediaFeature = 234,
236 PrefixedMinDevicePixelRatioMediaFeature = 235,
237 PrefixedTransform3dMediaFeature = 237,
238 PrefixedStorageQuota = 240,
239 ResetReferrerPolicy = 243,
240 CaseInsensitiveAttrSelectorMatch = 244, // Case-insensitivity dropped fr om specification.
241 FormNameAccessForImageElement = 246,
242 FormNameAccessForPastNamesMap = 247,
243 FormAssociationByParser = 248,
244 SVGSVGElementInDocument = 250,
245 SVGDocumentRootElement = 251,
246 MediaErrorEncrypted = 253,
247 EventSourceURL = 254,
248 WebSocketURL = 255,
249 WorkerSubjectToCSP = 257,
250 WorkerAllowedByChildBlockedByScript = 258,
251 DeprecatedWebKitGradient = 260,
252 DeprecatedWebKitLinearGradient = 261,
253 DeprecatedWebKitRepeatingLinearGradient = 262,
254 DeprecatedWebKitRadialGradient = 263,
255 DeprecatedWebKitRepeatingRadialGradient = 264,
256 PrefixedImageSmoothingEnabled = 267,
257 UnprefixedImageSmoothingEnabled = 268,
258 // The above items are available in M34 branch.
259
260 TextAutosizing = 274,
261 HTMLAnchorElementPingAttribute = 276,
262 InsertAdjacentHTML = 278,
263 SVGClassName = 279,
264 HTMLAppletElement = 280,
265 HTMLMediaElementSeekToFragmentStart = 281,
266 HTMLMediaElementPauseAtFragmentEnd = 282,
267 PrefixedWindowURL = 283,
268 PrefixedWorkerURL = 284, // This didn't work because of crbug.com/376039 . Available since M37.
269 WindowOrientation = 285,
270 DOMStringListContains = 286,
271 DocumentCaptureEvents = 287,
272 DocumentReleaseEvents = 288,
273 WindowCaptureEvents = 289,
274 WindowReleaseEvents = 290,
275 PrefixedGamepad = 291,
276 ElementAnimateKeyframeListEffectObjectTiming = 292,
277 ElementAnimateKeyframeListEffectDoubleTiming = 293,
278 ElementAnimateKeyframeListEffectNoTiming = 294,
279 DocumentXPathCreateExpression = 295,
280 DocumentXPathCreateNSResolver = 296,
281 DocumentXPathEvaluate = 297,
282 AttrGetValue = 298,
283 AttrSetValue = 299,
284 AnimationConstructorKeyframeListEffectObjectTiming = 300,
285 AnimationConstructorKeyframeListEffectDoubleTiming = 301,
286 AnimationConstructorKeyframeListEffectNoTiming = 302,
287 AttrSetValueWithElement = 303,
288 PrefixedCancelAnimationFrame = 304,
289 PrefixedCancelRequestAnimationFrame = 305,
290 NamedNodeMapGetNamedItem = 306,
291 NamedNodeMapSetNamedItem = 307,
292 NamedNodeMapRemoveNamedItem = 308,
293 NamedNodeMapItem = 309,
294 NamedNodeMapGetNamedItemNS = 310,
295 NamedNodeMapSetNamedItemNS = 311,
296 NamedNodeMapRemoveNamedItemNS = 312,
297 XHRProgressEventPosition = 316,
298 XHRProgressEventTotalSize = 317,
299 PrefixedDocumentIsFullscreen = 318,
300 PrefixedDocumentCurrentFullScreenElement = 320,
301 PrefixedDocumentCancelFullScreen = 321,
302 PrefixedDocumentFullscreenEnabled = 322,
303 PrefixedDocumentFullscreenElement = 323,
304 PrefixedDocumentExitFullscreen = 324,
305 // The above items are available in M35 branch.
306
307 SVGForeignObjectElement = 325,
308 SelectionSetPosition = 327,
309 AnimationPlayerFinishEvent = 328,
310 SVGSVGElementInXMLDocument = 329,
311 PrefixedPerformanceClearResourceTimings = 341,
312 PrefixedPerformanceSetResourceTimingBufferSize = 342,
313 EventSrcElement = 343,
314 EventCancelBubble = 344,
315 EventPath = 345,
316 EventClipboardData = 346,
317 NodeIteratorDetach = 347,
318 AttrNodeValue = 348,
319 AttrTextContent = 349,
320 EventGetReturnValueTrue = 350,
321 EventGetReturnValueFalse = 351,
322 EventSetReturnValueTrue = 352,
323 EventSetReturnValueFalse = 353,
324 WindowOffscreenBuffering = 356,
325 WindowDefaultStatus = 357,
326 WindowDefaultstatus = 358,
327 PrefixedTransitionEventConstructor = 361,
328 PrefixedMutationObserverConstructor = 362,
329 PrefixedIDBCursorConstructor = 363,
330 PrefixedIDBDatabaseConstructor = 364,
331 PrefixedIDBFactoryConstructor = 365,
332 PrefixedIDBIndexConstructor = 366,
333 PrefixedIDBKeyRangeConstructor = 367,
334 PrefixedIDBObjectStoreConstructor = 368,
335 PrefixedIDBRequestConstructor = 369,
336 PrefixedIDBTransactionConstructor = 370,
337 NotificationPermission = 371,
338 RangeDetach = 372,
339 HTMLTableElementVspace = 374,
340 HTMLTableElementHspace = 375,
341 PrefixedTouchRadiusX = 378,
342 PrefixedTouchRadiusY = 379,
343 PrefixedTouchRotationAngle = 380,
344 PrefixedTouchForce = 381,
345 PrefixedMouseEventMovementX = 382,
346 PrefixedMouseEventMovementY = 383,
347 PrefixedFileRelativePath = 386,
348 DocumentCaretRangeFromPoint = 387,
349 DocumentGetCSSCanvasContext = 388,
350 ElementScrollIntoViewIfNeeded = 389,
351 RangeCompareNode = 392,
352 RangeExpand = 393,
353 HTMLImageElementX = 396,
354 HTMLImageElementY = 397,
355 SelectionBaseNode = 400,
356 SelectionBaseOffset = 401,
357 SelectionExtentNode = 402,
358 SelectionExtentOffset = 403,
359 SelectionType = 404,
360 SelectionModify = 405,
361 SelectionSetBaseAndExtent = 406,
362 SelectionEmpty = 407,
363 VTTCue = 409,
364 VTTCueRender = 410,
365 VTTCueRenderVertical = 411,
366 VTTCueRenderSnapToLinesFalse = 412,
367 VTTCueRenderLineNotAuto = 413,
368 VTTCueRenderPositionNot50 = 414,
369 VTTCueRenderSizeNot100 = 415,
370 VTTCueRenderAlignNotMiddle = 416,
371 // The above items are available in M36 branch.
372
373 ElementRequestPointerLock = 417,
374 VTTCueRenderRtl = 418,
375 PostMessageFromSecureToInsecure = 419,
376 PostMessageFromInsecureToSecure = 420,
377 DocumentExitPointerLock = 421,
378 DocumentPointerLockElement = 422,
379 PrefixedCursorZoomIn = 424,
380 PrefixedCursorZoomOut = 425,
381 CSSCharsetRuleEncoding = 426,
382 DocumentSetCharset = 427,
383 DocumentDefaultCharset = 428,
384 TextEncoderConstructor = 429,
385 TextEncoderEncode = 430,
386 TextDecoderConstructor = 431,
387 TextDecoderDecode = 432,
388 FocusInOutEvent = 433,
389 MouseEventMovementX = 434,
390 MouseEventMovementY = 435,
391 DocumentFonts = 440,
392 MixedContentFormsSubmitted = 441,
393 FormsSubmitted = 442,
394 TextInputEventOnInput = 443,
395 TextInputEventOnTextArea = 444,
396 TextInputEventOnContentEditable = 445,
397 TextInputEventOnNotNode = 446,
398 WebkitBeforeTextInsertedOnInput = 447,
399 WebkitBeforeTextInsertedOnTextArea = 448,
400 WebkitBeforeTextInsertedOnContentEditable = 449,
401 WebkitBeforeTextInsertedOnNotNode = 450,
402 WebkitEditableContentChangedOnInput = 451,
403 WebkitEditableContentChangedOnTextArea = 452,
404 WebkitEditableContentChangedOnContentEditable = 453,
405 WebkitEditableContentChangedOnNotNode = 454,
406 HTMLImports = 455,
407 ElementCreateShadowRoot = 456,
408 DocumentRegisterElement = 457,
409 EditingAppleInterchangeNewline = 458,
410 EditingAppleConvertedSpace = 459,
411 EditingApplePasteAsQuotation = 460,
412 EditingAppleStyleSpanClass = 461,
413 EditingAppleTabSpanClass = 462,
414 HTMLImportsAsyncAttribute = 463,
415 FontFaceSetReady = 464,
416 XMLHttpRequestSynchronous = 465,
417 CSSSelectorPseudoUnresolved = 466,
418 CSSSelectorPseudoShadow = 467,
419 CSSSelectorPseudoContent = 468,
420 CSSSelectorPseudoHost = 469,
421 CSSSelectorPseudoHostContext = 470,
422 CSSDeepCombinator = 471,
423 SyncXHRWithCredentials = 472,
424 // The above items are available in M37 branch.
425
426 UseAsm = 473,
427 DOMWindowOpen = 475,
428 DOMWindowOpenFeatures = 476,
429 MediaStreamTrackGetSources = 478,
430 AspectRatioFlexItem = 479,
431 DetailsElement = 480,
432 DialogElement = 481,
433 MapElement = 482,
434 MeterElement = 483,
435 ProgressElement = 484,
436 VideoFullscreenAllowedExemption = 485,
437 PrefixedHTMLElementDropzone = 490,
438 WheelEventWheelDeltaX = 491,
439 WheelEventWheelDeltaY = 492,
440 WheelEventWheelDelta = 493,
441 SendBeacon = 494,
442 SendBeaconQuotaExceeded = 495,
443 SVGSMILElementInDocument = 501,
444 MouseEventOffsetX = 502,
445 MouseEventOffsetY = 503,
446 MouseEventX = 504,
447 MouseEventY = 505,
448 MouseEventFromElement = 506,
449 MouseEventToElement = 507,
450 RequestFileSystem = 508,
451 RequestFileSystemWorker = 509,
452 RequestFileSystemSyncWorker = 510,
453 UIEventLayerX = 511,
454 UIEventLayerY = 512,
455 UIEventPageX = 513,
456 UIEventPageY = 514,
457 DevToolsConsoleTimeline = 517,
458 DevToolsConsoleProfile = 518,
459 SVGStyleElementTitle = 519,
460 PictureSourceSrc = 520,
461 // The above items are available in M38 branch.
462
463 Picture = 521,
464 Sizes = 522,
465 SrcsetXDescriptor = 523,
466 SrcsetWDescriptor = 524,
467 SelectionContainsNode = 525,
468 MediaStreamEnded = 526,
469 MixedContentPrivateIPInPublicWebsitePassive = 527,
470 MixedContentPrivateIPInPublicWebsiteActive = 528,
471 XMLExternalResourceLoad = 529,
472 MixedContentPrivateHostnameInPublicHostname = 530,
473 LegacyProtocolEmbeddedAsSubresource = 531,
474 RequestedSubresourceWithEmbeddedCredentials = 532,
475 NotificationCreated = 533,
476 NotificationClosed = 534,
477 NotificationPermissionRequested = 535,
478 MediaStreamLabel = 536,
479 MediaStreamStop = 537,
480 ConsoleTimeline = 538,
481 ConsoleTimelineEnd = 539,
482 SRIElementWithMatchingIntegrityAttribute = 540,
483 SRIElementWithNonMatchingIntegrityAttribute = 541,
484 SRIElementWithUnparsableIntegrityAttribute = 542,
485 SRIElementWithIntegrityAttributeAndInsecureOrigin = 543,
486 SRIElementWithIntegrityAttributeAndInsecureResource = 544,
487 AnimationPlayerGetStartTime = 545,
488 AnimationPlayerSetStartTime = 546,
489 AnimationPlayerGetCurrentTime = 547,
490 AnimationPlayerSetCurrentTime = 548,
491 AnimationPlayerGetPlaybackRate = 549,
492 AnimationPlayerSetPlaybackRate = 550,
493 AnimationPlayerGetPlayState = 551,
494 AnimationPlayerFinish = 552,
495 AnimationPlayerPlay = 553,
496 AnimationPlayerPause = 554,
497 AnimationPlayerReverse = 555,
498 // The above items are available in M39 branch.
499
500 BreakIterator = 556,
501 ScreenOrientationAngle = 557,
502 ScreenOrientationType = 558,
503 ScreenOrientationLock = 559,
504 ScreenOrientationUnlock = 560,
505 GeolocationSecureOrigin = 561,
506 GeolocationInsecureOrigin = 562,
507 NotificationSecureOrigin = 563,
508 NotificationInsecureOrigin = 564,
509 NotificationShowEvent = 565,
510 CSSXGetComputedStyleQueries = 566,
511 SVG1DOM = 567,
512 SVGPathSegDOM = 568,
513 SVGTransformListConsolidate = 569,
514 SVGAnimatedTransformListBaseVal = 570,
515 QuotedAnimationName = 571,
516 QuotedKeyframesRule = 572,
517 SrcsetDroppedCandidate = 573,
518 WindowPostMessage = 574,
519 WindowPostMessageWithLegacyTargetOriginArgument = 575,
520 RenderRuby = 576,
521 CanvasRenderingContext2DCompositeOperationDarker = 577,
522 ScriptElementWithInvalidTypeHasSrc = 578,
523 TimelineStart = 579,
524 ElementBaseURIFromXMLBase = 580,
525 XMLHttpRequestSynchronousInNonWorkerOutsideBeforeUnload = 581,
526 CSSSelectorPseudoScrollbar = 582,
527 CSSSelectorPseudoScrollbarButton = 583,
528 CSSSelectorPseudoScrollbarThumb = 584,
529 CSSSelectorPseudoScrollbarTrack = 585,
530 CSSSelectorPseudoScrollbarTrackPiece = 586,
531 LangAttribute = 587,
532 LangAttributeOnHTML = 588,
533 LangAttributeOnBody = 589,
534 LangAttributeDoesNotMatchToUILocale = 590,
535 InputTypeSubmit = 591,
536 InputTypeSubmitWithValue = 592,
537 // The above items are available in M40 branch.
538
539 SetReferrerPolicy = 593,
540 DOMImplementationHasFeatureReturnFalseInternal = 594,
541 MouseEventWhich = 595,
542 UIEventCharCode = 596,
543 UIEventKeyCode = 597,
544 UIEventWhich = 598,
545 TextWholeText = 599,
546 AttrChildAccess = 600,
547 AttrChildChange = 601,
548
549 // Add new features immediately above this line. Don't change assigned
550 // numbers of any item, and don't reuse removed slots.
551 // Also, run update_use_counter_feature_enum.py in chromium/src/tools/me trics/histograms/
552 // to update the UMA mapping.
553 NumberOfFeatures, // This enum value must be last.
554 };
555
556 // "count" sets the bit for this feature to 1. Repeated calls are ignored. 64 // "count" sets the bit for this feature to 1. Repeated calls are ignored.
557 static void count(const Frame*, Feature); 65 static void count(const Frame*, Feature);
558 static void count(const Document&, Feature); 66 static void count(const Document&, Feature);
559 // This doesn't count for ExecutionContexts for shared workers and service 67 // This doesn't count for ExecutionContexts for shared workers and service
560 // workers. 68 // workers.
561 static void count(const ExecutionContext*, Feature); 69 static void count(const ExecutionContext*, Feature);
562 // Use countIfNotPrivateScript() instead of count() if you don't want 70 // Use countIfNotPrivateScript() instead of count() if you don't want
563 // to count metrics in private scripts. You should use 71 // to count metrics in private scripts. You should use
564 // countIfNotPrivateScript() in a binding layer. 72 // countIfNotPrivateScript() in a binding layer.
565 static void countIfNotPrivateScript(v8::Isolate*, const Frame*, Feature); 73 static void countIfNotPrivateScript(v8::Isolate*, const Frame*, Feature);
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
621 129
622 void updateMeasurements(); 130 void updateMeasurements();
623 131
624 OwnPtr<BitVector> m_countBits; 132 OwnPtr<BitVector> m_countBits;
625 BitVector m_CSSFeatureBits; 133 BitVector m_CSSFeatureBits;
626 }; 134 };
627 135
628 } // namespace blink 136 } // namespace blink
629 137
630 #endif // UseCounter_h 138 #endif // UseCounter_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698