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

Side by Side Diff: Source/devtools/front_end/console/ConsoleView.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) 2007, 2008 Apple Inc. All rights reserved. 2 * Copyright (C) 2007, 2008 Apple Inc. All rights reserved.
3 * Copyright (C) 2009 Joseph Pecoraro 3 * Copyright (C) 2009 Joseph Pecoraro
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 8 *
9 * 1. Redistributions of source code must retain the above copyright 9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 355 matching lines...) Expand 10 before | Expand all | Expand 10 after
366 366
367 _hidePromptSuggestBox: function() 367 _hidePromptSuggestBox: function()
368 { 368 {
369 this._prompt.hideSuggestBox(); 369 this._prompt.hideSuggestBox();
370 this._prompt.clearAutoComplete(true); 370 this._prompt.clearAutoComplete(true);
371 }, 371 },
372 372
373 _scheduleViewportRefresh: function() 373 _scheduleViewportRefresh: function()
374 { 374 {
375 /** 375 /**
376 * @param {!WebInspector.Throttler.FinishCallback} finishCallback
377 * @this {WebInspector.ConsoleView} 376 * @this {WebInspector.ConsoleView}
377 * @return {!Promise.<undefined>}
378 */ 378 */
379 function invalidateViewport(finishCallback) 379 function invalidateViewport()
380 { 380 {
381 if (this._needsFullUpdate) { 381 if (this._needsFullUpdate) {
382 this._updateMessageList(); 382 this._updateMessageList();
383 delete this._needsFullUpdate; 383 delete this._needsFullUpdate;
384 } else { 384 } else {
385 this._viewport.invalidate(); 385 this._viewport.invalidate();
386 } 386 }
387 finishCallback(); 387 return Promise.resolve();
388 } 388 }
389 this._viewportThrottler.schedule(invalidateViewport.bind(this)); 389 this._viewportThrottler.schedule(invalidateViewport.bind(this));
390 }, 390 },
391 391
392 _immediatelyScrollToBottom: function() 392 _immediatelyScrollToBottom: function()
393 { 393 {
394 // This will scroll viewport and trigger its refresh. 394 // This will scroll viewport and trigger its refresh.
395 this._promptElement.scrollIntoView(true); 395 this._promptElement.scrollIntoView(true);
396 }, 396 },
397 397
(...skipping 904 matching lines...) Expand 10 before | Expand all | Expand 10 after
1302 handleAction: function(context, actionId) 1302 handleAction: function(context, actionId)
1303 { 1303 {
1304 WebInspector.console.show(); 1304 WebInspector.console.show();
1305 } 1305 }
1306 } 1306 }
1307 1307
1308 /** 1308 /**
1309 * @typedef {{messageIndex: number, matchIndex: number}} 1309 * @typedef {{messageIndex: number, matchIndex: number}}
1310 */ 1310 */
1311 WebInspector.ConsoleView.RegexMatchRange; 1311 WebInspector.ConsoleView.RegexMatchRange;
OLDNEW
« no previous file with comments | « Source/devtools/front_end/common/Throttler.js ('k') | Source/devtools/front_end/elements/ComputedStyleWidget.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698