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

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/sdk/InspectorBackend.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 197 matching lines...) Expand 10 before | Expand all | Expand 10 after
208 { 208 {
209 this._lastMessageId = 1; 209 this._lastMessageId = 1;
210 this._pendingResponsesCount = 0; 210 this._pendingResponsesCount = 0;
211 this._agents = {}; 211 this._agents = {};
212 this._dispatchers = {}; 212 this._dispatchers = {};
213 this._callbacks = {}; 213 this._callbacks = {};
214 this._initialize(InspectorBackend._agentPrototypes, InspectorBackend._dispat cherPrototypes); 214 this._initialize(InspectorBackend._agentPrototypes, InspectorBackend._dispat cherPrototypes);
215 this._isConnected = true; 215 this._isConnected = true;
216 } 216 }
217 217
218 /** @enum {symbol} */
218 InspectorBackendClass.Connection.Events = { 219 InspectorBackendClass.Connection.Events = {
219 Disconnected: "Disconnected", 220 Disconnected: Symbol("Disconnected")
220 } 221 }
221 222
222 InspectorBackendClass.Connection.prototype = { 223 InspectorBackendClass.Connection.prototype = {
223 /** 224 /**
224 * @param {!Object.<string, !InspectorBackendClass.AgentPrototype>} agentPro totypes 225 * @param {!Object.<string, !InspectorBackendClass.AgentPrototype>} agentPro totypes
225 * @param {!Object.<string, !InspectorBackendClass.DispatcherPrototype>} dis patcherPrototypes 226 * @param {!Object.<string, !InspectorBackendClass.DispatcherPrototype>} dis patcherPrototypes
226 */ 227 */
227 _initialize: function(agentPrototypes, dispatcherPrototypes) 228 _initialize: function(agentPrototypes, dispatcherPrototypes)
228 { 229 {
229 for (var domain in agentPrototypes) { 230 for (var domain in agentPrototypes) {
(...skipping 503 matching lines...) Expand 10 before | Expand all | Expand 10 after
733 } 734 }
734 } 735 }
735 736
736 InspectorBackendClass.Options = { 737 InspectorBackendClass.Options = {
737 dumpInspectorTimeStats: false, 738 dumpInspectorTimeStats: false,
738 dumpInspectorProtocolMessages: false, 739 dumpInspectorProtocolMessages: false,
739 suppressRequestErrors: false 740 suppressRequestErrors: false
740 } 741 }
741 742
742 InspectorBackend = new InspectorBackendClass(); 743 InspectorBackend = new InspectorBackendClass();
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698