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

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/timeline_model/LayerTreeModel.js

Issue 2261933002: DevTools: Use JS symbols instead of strings for eligible events. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 months 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) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 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 are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 */ 59 */
60 WebInspector.LayerTreeModel = function(target) 60 WebInspector.LayerTreeModel = function(target)
61 { 61 {
62 WebInspector.SDKModel.call(this, WebInspector.LayerTreeModel, target); 62 WebInspector.SDKModel.call(this, WebInspector.LayerTreeModel, target);
63 target.registerLayerTreeDispatcher(new WebInspector.LayerTreeDispatcher(this )); 63 target.registerLayerTreeDispatcher(new WebInspector.LayerTreeDispatcher(this ));
64 WebInspector.targetManager.addEventListener(WebInspector.TargetManager.Event s.MainFrameNavigated, this._onMainFrameNavigated, this); 64 WebInspector.targetManager.addEventListener(WebInspector.TargetManager.Event s.MainFrameNavigated, this._onMainFrameNavigated, this);
65 /** @type {?WebInspector.LayerTreeBase} */ 65 /** @type {?WebInspector.LayerTreeBase} */
66 this._layerTree = null; 66 this._layerTree = null;
67 } 67 }
68 68
69 /** @enum {symbol} */
69 WebInspector.LayerTreeModel.Events = { 70 WebInspector.LayerTreeModel.Events = {
70 LayerTreeChanged: "LayerTreeChanged", 71 LayerTreeChanged: Symbol("LayerTreeChanged"),
71 LayerPainted: "LayerPainted", 72 LayerPainted: Symbol("LayerPainted"),
72 } 73 }
73 74
74 WebInspector.LayerTreeModel.ScrollRectType = { 75 WebInspector.LayerTreeModel.ScrollRectType = {
75 NonFastScrollable: {name: "NonFastScrollable", description: "Non fast scroll able"}, 76 NonFastScrollable: {name: "NonFastScrollable", description: "Non fast scroll able"},
76 TouchEventHandler: {name: "TouchEventHandler", description: "Touch event han dler"}, 77 TouchEventHandler: {name: "TouchEventHandler", description: "Touch event han dler"},
77 WheelEventHandler: {name: "WheelEventHandler", description: "Wheel event han dler"}, 78 WheelEventHandler: {name: "WheelEventHandler", description: "Wheel event han dler"},
78 RepaintsOnScroll: {name: "RepaintsOnScroll", description: "Repaints on scrol l"} 79 RepaintsOnScroll: {name: "RepaintsOnScroll", description: "Repaints on scrol l"}
79 } 80 }
80 81
81 WebInspector.LayerTreeModel.prototype = { 82 WebInspector.LayerTreeModel.prototype = {
(...skipping 1218 matching lines...) Expand 10 before | Expand all | Expand 10 after
1300 WebInspector.LayerTreeModel.fromTarget = function(target) 1301 WebInspector.LayerTreeModel.fromTarget = function(target)
1301 { 1302 {
1302 if (!target.hasDOMCapability()) 1303 if (!target.hasDOMCapability())
1303 return null; 1304 return null;
1304 1305
1305 var model = /** @type {?WebInspector.LayerTreeModel} */ (target.model(WebIns pector.LayerTreeModel)); 1306 var model = /** @type {?WebInspector.LayerTreeModel} */ (target.model(WebIns pector.LayerTreeModel));
1306 if (!model) 1307 if (!model)
1307 model = new WebInspector.LayerTreeModel(target); 1308 model = new WebInspector.LayerTreeModel(target);
1308 return model; 1309 return model;
1309 } 1310 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698