*/
SurpriseWallpaper.prototype.updateRandomWallpaper_ = function() {
var self = this;
- Constants.WallpaperLocalStorage.get(
+ Constants.WallpaperSyncStorage.get(
Constants.AccessLastSurpriseWallpaperChangedDate, function(items) {
var dateString = new Date().toDateString();
// At most one random wallpaper per day.
WallpaperUtil.saveToStorage(
Constants.AccessLastSurpriseWallpaperChangedDate,
dateString,
- false);
- }
+ true);
+ };
WallpaperUtil.setOnlineWallpaper(wallpaperURL, wallpaper.default_layout,
onSuccess, self.retryLater_.bind(self));
}
chrome.alarms.clearAll();
// Makes last changed date invalid.
WallpaperUtil.saveToStorage(Constants.AccessLastSurpriseWallpaperChangedDate,
- '', false);
+ '', true);
};
/**
frame: 'none',
width: WALLPAPER_PICKER_WIDTH,
height: WALLPAPER_PICKER_HEIGHT,
- minWidth: WALLPAPER_PICKER_WIDTH,
- maxWidth: WALLPAPER_PICKER_WIDTH,
- minHeight: WALLPAPER_PICKER_HEIGHT,
- maxHeight: WALLPAPER_PICKER_HEIGHT,
- transparentBackground: true
+ resizable: false,
+ alphaEnabled: true
}, function(w) {
wallpaperPickerWindow = w;
chrome.wallpaperPrivate.minimizeInactiveWindows();
w.onClosed.addListener(function() {
chrome.wallpaperPrivate.restoreMinimizedWindows();
});
+ WallpaperUtil.testSendMessage('wallpaper-window-created');
});
});