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

Side by Side Diff: chrome/browser/resources/chromeos/wallpaper_manager/js/wallpaper_images_grid.js

Issue 1004263002: Disable surprise me automatically if the current wallpaper was set by a third party application. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address Biao's comments. Created 5 years, 9 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 // 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
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
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 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698