| 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 var WALLPAPER_PICKER_WIDTH = 574; | 5 var WALLPAPER_PICKER_WIDTH = 574; |
| 6 var WALLPAPER_PICKER_HEIGHT = 420; | 6 var WALLPAPER_PICKER_HEIGHT = 420; |
| 7 | 7 |
| 8 var wallpaperPickerWindow; | 8 var wallpaperPickerWindow; |
| 9 | 9 |
| 10 var surpriseWallpaper = null; | 10 var surpriseWallpaper = null; |
| (...skipping 405 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 416 chrome.wallpaperPrivate.onWallpaperChangedBy3rdParty.addListener(function( | 416 chrome.wallpaperPrivate.onWallpaperChangedBy3rdParty.addListener(function( |
| 417 wallpaper, thumbnail, layout) { | 417 wallpaper, thumbnail, layout) { |
| 418 WallpaperUtil.saveToLocalStorage( | 418 WallpaperUtil.saveToLocalStorage( |
| 419 Constants.AccessLocalSurpriseMeEnabledKey, false, function() { | 419 Constants.AccessLocalSurpriseMeEnabledKey, false, function() { |
| 420 WallpaperUtil.saveToSyncStorage(Constants.AccessSyncSurpriseMeEnabledKey, | 420 WallpaperUtil.saveToSyncStorage(Constants.AccessSyncSurpriseMeEnabledKey, |
| 421 false); | 421 false); |
| 422 }); | 422 }); |
| 423 SurpriseWallpaper.getInstance().disable(); | 423 SurpriseWallpaper.getInstance().disable(); |
| 424 | 424 |
| 425 // Make third party wallpaper syncable through different devices. | 425 // Make third party wallpaper syncable through different devices. |
| 426 // TODO(xdai): also sync the third party app name. | |
| 427 var filename = Constants.ThirdPartyWallpaperPrefix + new Date().getTime(); | 426 var filename = Constants.ThirdPartyWallpaperPrefix + new Date().getTime(); |
| 428 var thumbnailFilename = filename + Constants.CustomWallpaperThumbnailSuffix; | 427 var thumbnailFilename = filename + Constants.CustomWallpaperThumbnailSuffix; |
| 429 WallpaperUtil.storeWallpaperToSyncFS(filename, wallpaper); | 428 WallpaperUtil.storeWallpaperToSyncFS(filename, wallpaper); |
| 430 WallpaperUtil.storeWallpaperToSyncFS(thumbnailFilename, thumbnail); | 429 WallpaperUtil.storeWallpaperToSyncFS(thumbnailFilename, thumbnail); |
| 431 WallpaperUtil.saveWallpaperInfo(filename, layout, | 430 WallpaperUtil.saveWallpaperInfo(filename, layout, |
| 432 Constants.WallpaperSourceEnum.Custom); | 431 Constants.WallpaperSourceEnum.Custom); |
| 433 }); | 432 }); |
| OLD | NEW |