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

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/workspace/UISourceCode.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 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 this._lineDecorations = new Map(); 55 this._lineDecorations = new Map();
56 56
57 /** @type {!Array.<!WebInspector.Revision>} */ 57 /** @type {!Array.<!WebInspector.Revision>} */
58 this.history = []; 58 this.history = [];
59 this._hasUnsavedCommittedChanges = false; 59 this._hasUnsavedCommittedChanges = false;
60 60
61 /** @type {!Array<!WebInspector.UISourceCode.Message>} */ 61 /** @type {!Array<!WebInspector.UISourceCode.Message>} */
62 this._messages = []; 62 this._messages = [];
63 } 63 }
64 64
65 /** 65 /** @enum {symbol} */
66 * @enum {string}
67 */
68 WebInspector.UISourceCode.Events = { 66 WebInspector.UISourceCode.Events = {
69 WorkingCopyChanged: "WorkingCopyChanged", 67 WorkingCopyChanged: Symbol("WorkingCopyChanged"),
70 WorkingCopyCommitted: "WorkingCopyCommitted", 68 WorkingCopyCommitted: Symbol("WorkingCopyCommitted"),
71 TitleChanged: "TitleChanged", 69 TitleChanged: Symbol("TitleChanged"),
72 SourceMappingChanged: "SourceMappingChanged", 70 SourceMappingChanged: Symbol("SourceMappingChanged"),
73 MessageAdded: "MessageAdded", 71 MessageAdded: Symbol("MessageAdded"),
74 MessageRemoved: "MessageRemoved", 72 MessageRemoved: Symbol("MessageRemoved"),
75 LineDecorationAdded: "LineDecorationAdded", 73 LineDecorationAdded: Symbol("LineDecorationAdded"),
76 LineDecorationRemoved: "LineDecorationRemoved" 74 LineDecorationRemoved: Symbol("LineDecorationRemoved")
77 } 75 }
78 76
79 WebInspector.UISourceCode.prototype = { 77 WebInspector.UISourceCode.prototype = {
80 /** 78 /**
81 * @return {string} 79 * @return {string}
82 */ 80 */
83 name: function() 81 name: function()
84 { 82 {
85 return this._name; 83 return this._name;
86 }, 84 },
(...skipping 887 matching lines...) Expand 10 before | Expand all | Expand 10 after
974 }, 972 },
975 973
976 /** 974 /**
977 * @return {*} 975 * @return {*}
978 */ 976 */
979 data: function() 977 data: function()
980 { 978 {
981 return this._data; 979 return this._data;
982 } 980 }
983 } 981 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698