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

Side by Side Diff: chrome/browser/resources/md_downloads/crisper.js

Issue 1515763003: MD Downloads: remove unused event parameter to fix closure compile (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@dl-data-limits
Patch Set: Created 5 years 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
« no previous file with comments | « no previous file | chrome/browser/resources/md_downloads/manager.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 4
5 if (typeof Polymer == 'undefined') 5 if (typeof Polymer == 'undefined')
6 Polymer = {dom: 'shadow'}; 6 Polymer = {dom: 'shadow'};
7 else 7 else
8 console.error('Polymer is already defined.'); 8 console.error('Polymer is already defined.');
9 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 9 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
10 // Use of this source code is governed by a BSD-style license that can be 10 // Use of this source code is governed by a BSD-style license that can be
(...skipping 17037 matching lines...) Expand 10 before | Expand all | Expand 10 after
17048 * @param {Event} e 17048 * @param {Event} e
17049 * @private 17049 * @private
17050 */ 17050 */
17051 onCommand_: function(e) { 17051 onCommand_: function(e) {
17052 if (e.command.id == 'clear-all-command') 17052 if (e.command.id == 'clear-all-command')
17053 downloads.ActionService.getInstance().clearAll(); 17053 downloads.ActionService.getInstance().clearAll();
17054 else if (e.command.id == 'undo-command') 17054 else if (e.command.id == 'undo-command')
17055 downloads.ActionService.getInstance().undo(); 17055 downloads.ActionService.getInstance().undo();
17056 }, 17056 },
17057 17057
17058 /** 17058 /** @private */
17059 * @param {Event} e 17059 onListScroll_: function() {
17060 * @private
17061 */
17062 onListScroll_: function(e) {
17063 var list = this.$['downloads-list']; 17060 var list = this.$['downloads-list'];
17064 if (list.scrollHeight - list.scrollTop - list.offsetHeight <= 100) { 17061 if (list.scrollHeight - list.scrollTop - list.offsetHeight <= 100) {
17065 // Approaching the end of the scrollback. Attempt to load more items. 17062 // Approaching the end of the scrollback. Attempt to load more items.
17066 downloads.ActionService.getInstance().loadMore(); 17063 downloads.ActionService.getInstance().loadMore();
17067 } 17064 }
17068 }, 17065 },
17069 17066
17070 /** @private */ 17067 /** @private */
17071 onLoad_: function() { 17068 onLoad_: function() {
17072 cr.ui.decorate('command', cr.ui.Command); 17069 cr.ui.decorate('command', cr.ui.Command);
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
17139 Manager.get().updateItem_(index, data); 17136 Manager.get().updateItem_(index, data);
17140 }; 17137 };
17141 17138
17142 return {Manager: Manager}; 17139 return {Manager: Manager};
17143 }); 17140 });
17144 // Copyright 2015 The Chromium Authors. All rights reserved. 17141 // Copyright 2015 The Chromium Authors. All rights reserved.
17145 // Use of this source code is governed by a BSD-style license that can be 17142 // Use of this source code is governed by a BSD-style license that can be
17146 // found in the LICENSE file. 17143 // found in the LICENSE file.
17147 17144
17148 window.addEventListener('load', downloads.Manager.onLoad); 17145 window.addEventListener('load', downloads.Manager.onLoad);
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/resources/md_downloads/manager.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698