| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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('wallpapers', function() { | 5 cr.define('wallpapers', function() { |
| 6 /** @const */ var ArrayDataModel = cr.ui.ArrayDataModel; | 6 /** @const */ var ArrayDataModel = cr.ui.ArrayDataModel; |
| 7 /** @const */ var Grid = cr.ui.Grid; | 7 /** @const */ var Grid = cr.ui.Grid; |
| 8 /** @const */ var GridItem = cr.ui.GridItem; | 8 /** @const */ var GridItem = cr.ui.GridItem; |
| 9 /** @const */ var GridSelectionController = cr.ui.GridSelectionController; | 9 /** @const */ var GridSelectionController = cr.ui.GridSelectionController; |
| 10 /** @const */ var ListSingleSelectionModel = cr.ui.ListSingleSelectionModel; | 10 /** @const */ var ListSingleSelectionModel = cr.ui.ListSingleSelectionModel; |
| (...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 216 * wallpaperInfo The information of the wallpaper to be set active. | 216 * wallpaperInfo The information of the wallpaper to be set active. |
| 217 */ | 217 */ |
| 218 activeItem_: undefined, | 218 activeItem_: undefined, |
| 219 set activeItem(activeItem) { | 219 set activeItem(activeItem) { |
| 220 if (this.activeItem_ != activeItem) { | 220 if (this.activeItem_ != activeItem) { |
| 221 this.activeItem_ = activeItem; | 221 this.activeItem_ = activeItem; |
| 222 this.updateActiveThumb_(); | 222 this.updateActiveThumb_(); |
| 223 } | 223 } |
| 224 }, | 224 }, |
| 225 | 225 |
| 226 get activeItem() { |
| 227 return this.activeItem_; |
| 228 }, |
| 229 |
| 226 /** | 230 /** |
| 227 * A unique ID that assigned to each set dataModel operation. Note that this | 231 * A unique ID that assigned to each set dataModel operation. Note that this |
| 228 * id wont increase if the new dataModel is null or empty. | 232 * id wont increase if the new dataModel is null or empty. |
| 229 */ | 233 */ |
| 230 dataModelId_: 0, | 234 dataModelId_: 0, |
| 231 | 235 |
| 232 /** | 236 /** |
| 233 * The number of items that need to be generated after a new dataModel is | 237 * The number of items that need to be generated after a new dataModel is |
| 234 * set. | 238 * set. |
| 235 */ | 239 */ |
| (...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 386 // The active thumbnail maybe deleted in the above redraw(). Sets it again | 390 // The active thumbnail maybe deleted in the above redraw(). Sets it again |
| 387 // to make sure checkmark shows correctly. | 391 // to make sure checkmark shows correctly. |
| 388 this.updateActiveThumb_(); | 392 this.updateActiveThumb_(); |
| 389 } | 393 } |
| 390 }; | 394 }; |
| 391 | 395 |
| 392 return { | 396 return { |
| 393 WallpaperThumbnailsGrid: WallpaperThumbnailsGrid | 397 WallpaperThumbnailsGrid: WallpaperThumbnailsGrid |
| 394 }; | 398 }; |
| 395 }); | 399 }); |
| OLD | NEW |