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

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/sdk/SourceMap.js

Issue 2515763003: DevTools: use shorthand syntax in interface definitions. (Closed)
Patch Set: Created 4 years, 1 month 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) 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2012 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 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 87
88 /** 88 /**
89 * @interface 89 * @interface
90 */ 90 */
91 SDK.SourceMap = function() {}; 91 SDK.SourceMap = function() {};
92 92
93 SDK.SourceMap.prototype = { 93 SDK.SourceMap.prototype = {
94 /** 94 /**
95 * @return {string} 95 * @return {string}
96 */ 96 */
97 compiledURL: function() {}, 97 compiledURL() {},
98 98
99 /** 99 /**
100 * @return {string} 100 * @return {string}
101 */ 101 */
102 url: function() {}, 102 url() {},
103 103
104 /** 104 /**
105 * @return {!Array<string>} 105 * @return {!Array<string>}
106 */ 106 */
107 sourceURLs: function() {}, 107 sourceURLs() {},
108 108
109 /** 109 /**
110 * @param {string} sourceURL 110 * @param {string} sourceURL
111 * @param {!Common.ResourceType} contentType 111 * @param {!Common.ResourceType} contentType
112 * @return {!Common.ContentProvider} 112 * @return {!Common.ContentProvider}
113 */ 113 */
114 sourceContentProvider: function(sourceURL, contentType) {}, 114 sourceContentProvider(sourceURL, contentType) {},
115 115
116 /** 116 /**
117 * @param {string} sourceURL 117 * @param {string} sourceURL
118 * @return {?string} 118 * @return {?string}
119 */ 119 */
120 embeddedContentByURL: function(sourceURL) {}, 120 embeddedContentByURL(sourceURL) {},
121 121
122 /** 122 /**
123 * @param {number} lineNumber in compiled resource 123 * @param {number} lineNumber in compiled resource
124 * @param {number} columnNumber in compiled resource 124 * @param {number} columnNumber in compiled resource
125 * @return {?SDK.SourceMapEntry} 125 * @return {?SDK.SourceMapEntry}
126 */ 126 */
127 findEntry: function(lineNumber, columnNumber) {}, 127 findEntry(lineNumber, columnNumber) {},
128 128
129 /** 129 /**
130 * @return {boolean} 130 * @return {boolean}
131 */ 131 */
132 editable: function() {}, 132 editable() {},
133 133
134 /** 134 /**
135 * @param {!Array<!Common.TextRange>} ranges 135 * @param {!Array<!Common.TextRange>} ranges
136 * @param {!Array<string>} texts 136 * @param {!Array<string>} texts
137 * @return {!Promise<?SDK.SourceMap.EditResult>} 137 * @return {!Promise<?SDK.SourceMap.EditResult>}
138 */ 138 */
139 editCompiled: function(ranges, texts) {}, 139 editCompiled(ranges, texts) {},
140 }; 140 };
141 141
142 /** 142 /**
143 * @unrestricted 143 * @unrestricted
144 */ 144 */
145 SDK.SourceMap.EditResult = class { 145 SDK.SourceMap.EditResult = class {
146 /** 146 /**
147 * @param {!SDK.SourceMap} map 147 * @param {!SDK.SourceMap} map
148 * @param {!Array<!Common.SourceEdit>} compiledEdits 148 * @param {!Array<!Common.SourceEdit>} compiledEdits
149 * @param {!Map<string, string>} newSources 149 * @param {!Map<string, string>} newSources
150 */ 150 */
151 constructor(map, compiledEdits, newSources) { 151 constructor(map, compiledEdits, newSources) {
152 this.map = map; 152 this.map = map;
153 this.compiledEdits = compiledEdits; 153 this.compiledEdits = compiledEdits;
154 this.newSources = newSources; 154 this.newSources = newSources;
155 } 155 }
156 }; 156 };
157 157
158 /** 158 /**
159 * @interface 159 * @interface
160 */ 160 */
161 SDK.SourceMapFactory = function() {}; 161 SDK.SourceMapFactory = function() {};
162 162
163 SDK.SourceMapFactory.prototype = { 163 SDK.SourceMapFactory.prototype = {
164 /** 164 /**
165 * @param {!SDK.Target} target 165 * @param {!SDK.Target} target
166 * @param {!SDK.SourceMap} sourceMap 166 * @param {!SDK.SourceMap} sourceMap
167 * @return {!Promise<?SDK.SourceMap>} 167 * @return {!Promise<?SDK.SourceMap>}
168 */ 168 */
169 editableSourceMap: function(target, sourceMap) {}, 169 editableSourceMap(target, sourceMap) {},
170 }; 170 };
171 171
172 /** 172 /**
173 * @implements {SDK.SourceMap} 173 * @implements {SDK.SourceMap}
174 * @unrestricted 174 * @unrestricted
175 */ 175 */
176 SDK.TextSourceMap = class { 176 SDK.TextSourceMap = class {
177 /** 177 /**
178 * Implements Source Map V3 model. See https://github.com/google/closure-compi ler/wiki/Source-Maps 178 * Implements Source Map V3 model. See https://github.com/google/closure-compi ler/wiki/Source-Maps
179 * for format description. 179 * for format description.
(...skipping 409 matching lines...) Expand 10 before | Expand all | Expand 10 after
589 * @param {?string} content 589 * @param {?string} content
590 * @param {?Array<!SDK.SourceMapEntry>} reverseMappings 590 * @param {?Array<!SDK.SourceMapEntry>} reverseMappings
591 */ 591 */
592 constructor(content, reverseMappings) { 592 constructor(content, reverseMappings) {
593 this.content = content; 593 this.content = content;
594 this.reverseMappings = reverseMappings; 594 this.reverseMappings = reverseMappings;
595 } 595 }
596 }; 596 };
597 597
598 SDK.TextSourceMap._sourcesListSymbol = Symbol('sourcesList'); 598 SDK.TextSourceMap._sourcesListSymbol = Symbol('sourcesList');
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698