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

Side by Side Diff: Source/devtools/front_end/bindings/WorkspaceController.js

Issue 1285183006: DevTools: WI.Throttler goes promisified. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@cc
Patch Set: remove dependent patchset Created 5 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) 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
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 }
OLDNEW
« no previous file with comments | « Source/devtools/front_end/bindings/StylesSourceMapping.js ('k') | Source/devtools/front_end/common/Throttler.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698