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

Side by Side Diff: Source/devtools/front_end/sdk/Workspace.js

Issue 353743008: DevTools: Throttle file system refreshes on focus. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 6 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 | Annotate | Revision Log
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 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 92
93 /** 93 /**
94 * @param {string} path 94 * @param {string} path
95 * @param {string} newName 95 * @param {string} newName
96 * @param {function(boolean, string=, string=, string=, !WebInspector.Resour ceType=)} callback 96 * @param {function(boolean, string=, string=, string=, !WebInspector.Resour ceType=)} callback
97 */ 97 */
98 rename: function(path, newName, callback) { }, 98 rename: function(path, newName, callback) { },
99 99
100 /** 100 /**
101 * @param {string} path 101 * @param {string} path
102 * @param {function()=} callback
102 */ 103 */
103 refresh: function(path) { }, 104 refresh: function(path, callback) { },
104 105
105 /** 106 /**
106 * @param {string} path 107 * @param {string} path
107 */ 108 */
108 excludeFolder: function(path) { }, 109 excludeFolder: function(path) { },
109 110
110 /** 111 /**
111 * @param {string} path 112 * @param {string} path
112 * @param {?string} name 113 * @param {?string} name
113 * @param {string} content 114 * @param {string} content
(...skipping 317 matching lines...) Expand 10 before | Expand all | Expand 10 after
431 var oldPath = uiSourceCode.path(); 432 var oldPath = uiSourceCode.path();
432 var newPath = uiSourceCode.parentPath() ? uiSourceCode.parentPath() + "/" + newName : newName; 433 var newPath = uiSourceCode.parentPath() ? uiSourceCode.parentPath() + "/" + newName : newName;
433 this._uiSourceCodesMap[newPath] = this._uiSourceCodesMap[oldPath]; 434 this._uiSourceCodesMap[newPath] = this._uiSourceCodesMap[oldPath];
434 delete this._uiSourceCodesMap[oldPath]; 435 delete this._uiSourceCodesMap[oldPath];
435 callback(true, newName, newURL, newOriginURL, newContentType); 436 callback(true, newName, newURL, newOriginURL, newContentType);
436 } 437 }
437 }, 438 },
438 439
439 /** 440 /**
440 * @param {string} path 441 * @param {string} path
442 * @param {function()=} callback
441 */ 443 */
442 refresh: function(path) 444 refresh: function(path, callback)
443 { 445 {
444 this._projectDelegate.refresh(path); 446 this._projectDelegate.refresh(path);
lushnikov 2014/06/26 16:01:25 forgot to pass |callback| in the refresh
445 }, 447 },
446 448
447 /** 449 /**
448 * @param {string} path 450 * @param {string} path
449 */ 451 */
450 excludeFolder: function(path) 452 excludeFolder: function(path)
451 { 453 {
452 this._projectDelegate.excludeFolder(path); 454 this._projectDelegate.excludeFolder(path);
453 var uiSourceCodes = this._uiSourceCodesList.slice(); 455 var uiSourceCodes = this._uiSourceCodesList.slice();
454 for (var i = 0; i < uiSourceCodes.length; ++i) { 456 for (var i = 0; i < uiSourceCodes.length; ++i) {
(...skipping 315 matching lines...) Expand 10 before | Expand all | Expand 10 after
770 return this._hasResourceContentTrackingExtensions; 772 return this._hasResourceContentTrackingExtensions;
771 }, 773 },
772 774
773 __proto__: WebInspector.Object.prototype 775 __proto__: WebInspector.Object.prototype
774 } 776 }
775 777
776 /** 778 /**
777 * @type {!WebInspector.Workspace} 779 * @type {!WebInspector.Workspace}
778 */ 780 */
779 WebInspector.workspace; 781 WebInspector.workspace;
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698