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

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/timeline/TimelineUIUtils.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 * Copyright (C) 2012 Intel Inc. All rights reserved. 3 * Copyright (C) 2012 Intel Inc. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are 6 * modification, are permitted provided that the following conditions are
7 * met: 7 * met:
8 * 8 *
9 * * Redistributions of source code must retain the above copyright 9 * * Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 1753 matching lines...) Expand 10 before | Expand all | Expand 10 after
1764 WebInspector.TimelineCategory = function(name, title, visible, childColor, color ) 1764 WebInspector.TimelineCategory = function(name, title, visible, childColor, color )
1765 { 1765 {
1766 this.name = name; 1766 this.name = name;
1767 this.title = title; 1767 this.title = title;
1768 this.visible = visible; 1768 this.visible = visible;
1769 this.childColor = childColor; 1769 this.childColor = childColor;
1770 this.color = color; 1770 this.color = color;
1771 this.hidden = false; 1771 this.hidden = false;
1772 } 1772 }
1773 1773
1774 /** @enum {symbol} */
1774 WebInspector.TimelineCategory.Events = { 1775 WebInspector.TimelineCategory.Events = {
1775 VisibilityChanged: "VisibilityChanged" 1776 VisibilityChanged: Symbol("VisibilityChanged")
1776 }; 1777 };
1777 1778
1778 WebInspector.TimelineCategory.prototype = { 1779 WebInspector.TimelineCategory.prototype = {
1779 /** 1780 /**
1780 * @return {boolean} 1781 * @return {boolean}
1781 */ 1782 */
1782 get hidden() 1783 get hidden()
1783 { 1784 {
1784 return this._hidden; 1785 return this._hidden;
1785 }, 1786 },
(...skipping 360 matching lines...) Expand 10 before | Expand all | Expand 10 after
2146 case warnings.V8Deopt: 2147 case warnings.V8Deopt:
2147 span.appendChild(WebInspector.linkifyURLAsNode("https://github.com/Googl eChrome/devtools-docs/issues/53", 2148 span.appendChild(WebInspector.linkifyURLAsNode("https://github.com/Googl eChrome/devtools-docs/issues/53",
2148 WebInspector.UIString("Not optimized"), undefined, true)); 2149 WebInspector.UIString("Not optimized"), undefined, true));
2149 span.createTextChild(WebInspector.UIString(": %s", eventData["deoptReaso n"])); 2150 span.createTextChild(WebInspector.UIString(": %s", eventData["deoptReaso n"]));
2150 break; 2151 break;
2151 default: 2152 default:
2152 console.assert(false, "Unhandled TimelineModel.WarningType"); 2153 console.assert(false, "Unhandled TimelineModel.WarningType");
2153 } 2154 }
2154 return span; 2155 return span;
2155 } 2156 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698