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

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

Issue 2651043006: DevTools: Remove files in the navigator when they are deleted externally (Closed)
Patch Set: Created 3 years, 10 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 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 /* eslint-disable indent */ 4 /* eslint-disable indent */
5 (function(window) { 5 (function(window) {
6 6
7 // DevToolsAPI --------------------------------------------------------------- - 7 // DevToolsAPI --------------------------------------------------------------- -
8 8
9 /** 9 /**
10 * @unrestricted 10 * @unrestricted
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after
169 169
170 /** 170 /**
171 * @param {!{fileSystemName: string, rootURL: string, fileSystemPath: string }} fileSystem 171 * @param {!{fileSystemName: string, rootURL: string, fileSystemPath: string }} fileSystem
172 */ 172 */
173 fileSystemAdded(fileSystem) { 173 fileSystemAdded(fileSystem) {
174 this._dispatchOnInspectorFrontendAPI('fileSystemAdded', ['', fileSystem]); 174 this._dispatchOnInspectorFrontendAPI('fileSystemAdded', ['', fileSystem]);
175 } 175 }
176 176
177 /** 177 /**
178 * @param {!Array<string>} changedPaths 178 * @param {!Array<string>} changedPaths
179 * @param {!Array<string>} addedPaths
180 * @param {!Array<string>} removedPaths
179 */ 181 */
180 fileSystemFilesChanged(changedPaths) { 182 fileSystemFilesChangedAddedRemoved(changedPaths, addedPaths, removedPaths) {
181 this._dispatchOnInspectorFrontendAPI('fileSystemFilesChanged', [changedPat hs]); 183 // Support for legacy front-ends (<M58)
184 if (window['InspectorFrontendAPI'] && window['InspectorFrontendAPI']['file SystemFilesChanged']) {
185 this._dispatchOnInspectorFrontendAPI(
186 'fileSystemFilesChanged', [changedPaths.concat(addedPaths).concat(re movedPaths)]);
lushnikov 2017/01/25 02:23:10 nit: maybe use .pushAll to avoid multiple array co
einbinder 2017/01/25 19:53:12 I don't think devtools_compatibility should rely o
187 } else {
188 this._dispatchOnInspectorFrontendAPI(
189 'fileSystemFilesChangedAddedRemoved', [changedPaths, addedPaths, rem ovedPaths]);
190 }
182 } 191 }
183 192
184 /** 193 /**
185 * @param {number} requestId 194 * @param {number} requestId
186 * @param {string} fileSystemPath 195 * @param {string} fileSystemPath
187 * @param {number} totalWork 196 * @param {number} totalWork
188 */ 197 */
189 indexingTotalWorkCalculated(requestId, fileSystemPath, totalWork) { 198 indexingTotalWorkCalculated(requestId, fileSystemPath, totalWork) {
190 this._dispatchOnInspectorFrontendAPI('indexingTotalWorkCalculated', [reque stId, fileSystemPath, totalWork]); 199 this._dispatchOnInspectorFrontendAPI('indexingTotalWorkCalculated', [reque stId, fileSystemPath, totalWork]);
191 } 200 }
(...skipping 1053 matching lines...) Expand 10 before | Expand all | Expand 10 after
1245 * @return {boolean} 1254 * @return {boolean}
1246 */ 1255 */
1247 DOMTokenList.prototype.toggle = function(token, force) { 1256 DOMTokenList.prototype.toggle = function(token, force) {
1248 if (arguments.length === 1) 1257 if (arguments.length === 1)
1249 force = !this.contains(token); 1258 force = !this.contains(token);
1250 return this.__originalDOMTokenListToggle(token, !!force); 1259 return this.__originalDOMTokenListToggle(token, !!force);
1251 }; 1260 };
1252 } 1261 }
1253 1262
1254 })(window); 1263 })(window);
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698