| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 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 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 43 WebInspector.WorkspaceController.prototype = { | 43 WebInspector.WorkspaceController.prototype = { |
| 44 /** | 44 /** |
| 45 * @param {!Event} event | 45 * @param {!Event} event |
| 46 */ | 46 */ |
| 47 _windowFocused: function(event) | 47 _windowFocused: function(event) |
| 48 { | 48 { |
| 49 this._fileSystemRefreshThrottler.schedule(refreshFileSystems.bind(this))
; | 49 this._fileSystemRefreshThrottler.schedule(refreshFileSystems.bind(this))
; |
| 50 | 50 |
| 51 /** | 51 /** |
| 52 * @this {WebInspector.WorkspaceController} | 52 * @this {WebInspector.WorkspaceController} |
| 53 * @param {!WebInspector.Throttler.FinishCallback} callback | |
| 54 */ | 53 */ |
| 55 function refreshFileSystems(callback) | 54 function refreshFileSystems() |
| 56 { | 55 { |
| 57 var barrier = new CallbackBarrier(); | 56 var barrier = new CallbackBarrier(); |
| 58 var projects = this._workspace.projects(); | 57 var projects = this._workspace.projects(); |
| 59 for (var i = 0; i < projects.length; ++i) | 58 for (var i = 0; i < projects.length; ++i) |
| 60 projects[i].refresh("/", barrier.createCallback()); | 59 projects[i].refresh("/", barrier.createCallback()); |
| 61 barrier.callWhenDone(callback); | 60 return barrier.donePromise(); |
| 62 } | 61 } |
| 63 } | 62 } |
| 64 } | 63 } |
| OLD | NEW |