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 256 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
267 WallpaperUtil.saveToStorage(Constants.AccessLocalWallpaperInfoKey, | 267 WallpaperUtil.saveToStorage(Constants.AccessLocalWallpaperInfoKey, |
268 newValue, false); | 268 newValue, false); |
269 } | 269 } |
270 }); | 270 }); |
271 } | 271 } |
272 }); | 272 }); |
273 | 273 |
274 chrome.alarms.onAlarm.addListener(function() { | 274 chrome.alarms.onAlarm.addListener(function() { |
275 SurpriseWallpaper.getInstance().next(); | 275 SurpriseWallpaper.getInstance().next(); |
276 }); | 276 }); |
277 | |
278 /** | |
279 * Enables surprise me wallpaper iff it has not already been configured. | |
280 */ | |
281 chrome.wallpaperPrivate.onRequestEnableSurpriseMe.addListener(function() { | |
282 Constants.WallpaperSyncStorage.get(Constants.AccessSurpriseMeEnabledKey, | |
283 function(items) { | |
284 if (!items.hasOwnProperty(Constants.AccessSurpriseMeEnabledKey)) { | |
Nikita (slow)
2014/04/08 16:58:27
I wonder if that's the right time to check for thi
Harry McCleave
2014/04/09 02:41:33
My impression was that if this sync fails for what
bshe
2014/04/09 14:32:15
Is this going to be called when an existing user l
| |
285 WallpaperUtil.saveToStorage(Constants.AccessSurpriseMeEnabledKey, | |
286 true, true); | |
287 } | |
288 }); | |
289 }); | |
OLD | NEW |