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

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/components/HandlerRegistry.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) 2011 Google Inc. All rights reserved. 2 * Copyright (C) 2011 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 195 matching lines...) Expand 10 before | Expand all | Expand 10 after
206 if (!targetNode.enclosingNodeOrSelfWithClassList(["resources", "panel"]) && WebInspector.resourceForURL(resourceURL)) 206 if (!targetNode.enclosingNodeOrSelfWithClassList(["resources", "panel"]) && WebInspector.resourceForURL(resourceURL))
207 contextMenu.appendItem(WebInspector.UIString.capitalize("Open ^link in Resources ^panel"), openInResourcesPanel.bind(null, resourceURL)); 207 contextMenu.appendItem(WebInspector.UIString.capitalize("Open ^link in Resources ^panel"), openInResourcesPanel.bind(null, resourceURL));
208 208
209 209
210 contextMenu.appendItem(WebInspector.copyLinkAddressLabel(), InspectorFro ntendHost.copyText.bind(InspectorFrontendHost, resourceURL)); 210 contextMenu.appendItem(WebInspector.copyLinkAddressLabel(), InspectorFro ntendHost.copyText.bind(InspectorFrontendHost, resourceURL));
211 }, 211 },
212 212
213 __proto__: WebInspector.Object.prototype 213 __proto__: WebInspector.Object.prototype
214 } 214 }
215 215
216 216 /** @enum {symbol} */
217 WebInspector.HandlerRegistry.EventTypes = { 217 WebInspector.HandlerRegistry.EventTypes = {
218 HandlersUpdated: "HandlersUpdated" 218 HandlersUpdated: Symbol("HandlersUpdated")
219 } 219 }
220 220
221 /** 221 /**
222 * @constructor 222 * @constructor
223 */ 223 */
224 WebInspector.HandlerSelector = function(handlerRegistry) 224 WebInspector.HandlerSelector = function(handlerRegistry)
225 { 225 {
226 this._handlerRegistry = handlerRegistry; 226 this._handlerRegistry = handlerRegistry;
227 this.element = createElementWithClass("select", "chrome-select"); 227 this.element = createElementWithClass("select", "chrome-select");
228 this.element.addEventListener("change", this._onChange.bind(this), false); 228 this.element.addEventListener("change", this._onChange.bind(this), false);
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
317 317
318 var handlerSelector = new WebInspector.HandlerSelector(WebInspector.open AnchorLocationRegistry); 318 var handlerSelector = new WebInspector.HandlerSelector(WebInspector.open AnchorLocationRegistry);
319 return WebInspector.SettingsUI.createCustomSetting(WebInspector.UIString ("Link handling:"), handlerSelector.element); 319 return WebInspector.SettingsUI.createCustomSetting(WebInspector.UIString ("Link handling:"), handlerSelector.element);
320 } 320 }
321 } 321 }
322 322
323 /** 323 /**
324 * @type {!WebInspector.HandlerRegistry} 324 * @type {!WebInspector.HandlerRegistry}
325 */ 325 */
326 WebInspector.openAnchorLocationRegistry; 326 WebInspector.openAnchorLocationRegistry;
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698