| OLD | NEW |
| 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 cr.define('downloads', function() { | 5 cr.define('downloads', function() { |
| 6 var Manager = Polymer({ | 6 var Manager = Polymer({ |
| 7 is: 'downloads-manager', | 7 is: 'downloads-manager', |
| 8 | 8 |
| 9 properties: { | 9 properties: { |
| 10 /** @private */ | 10 /** @private */ |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 45 | 45 |
| 46 listeners: { | 46 listeners: { |
| 47 'downloads-list.scroll': 'onListScroll_', | 47 'downloads-list.scroll': 'onListScroll_', |
| 48 'toolbar.search-changed': 'onSearchChanged_', | 48 'toolbar.search-changed': 'onSearchChanged_', |
| 49 }, | 49 }, |
| 50 | 50 |
| 51 observers: [ | 51 observers: [ |
| 52 'itemsChanged_(items_.*)', | 52 'itemsChanged_(items_.*)', |
| 53 ], | 53 ], |
| 54 | 54 |
| 55 attached: function() { |
| 56 document.documentElement.removeAttribute('loading'); |
| 57 }, |
| 58 |
| 55 /** @private {!PromiseResolver} */ | 59 /** @private {!PromiseResolver} */ |
| 56 loaded_: new PromiseResolver, | 60 loaded_: new PromiseResolver, |
| 57 | 61 |
| 58 /** @private */ | 62 /** @private */ |
| 59 clearAll_: function() { | 63 clearAll_: function() { |
| 60 this.set('items_', []); | 64 this.set('items_', []); |
| 61 }, | 65 }, |
| 62 | 66 |
| 63 /** @private */ | 67 /** @private */ |
| 64 hasDownloadsChanged_: function() { | 68 hasDownloadsChanged_: function() { |
| (...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 231 Manager.removeItem = function(index) { | 235 Manager.removeItem = function(index) { |
| 232 Manager.get().removeItem_(index); | 236 Manager.get().removeItem_(index); |
| 233 }; | 237 }; |
| 234 | 238 |
| 235 Manager.updateItem = function(index, data) { | 239 Manager.updateItem = function(index, data) { |
| 236 Manager.get().updateItem_(index, data); | 240 Manager.get().updateItem_(index, data); |
| 237 }; | 241 }; |
| 238 | 242 |
| 239 return {Manager: Manager}; | 243 return {Manager: Manager}; |
| 240 }); | 244 }); |
| OLD | NEW |