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

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

Issue 13483011: Call failure callback when failed to set custom wallpaper. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years, 8 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 /** 5 /**
6 * WallpaperManager constructor. 6 * WallpaperManager constructor.
7 * 7 *
8 * WallpaperManager objects encapsulate the functionality of the wallpaper 8 * WallpaperManager objects encapsulate the functionality of the wallpaper
9 * manager extension. 9 * manager extension.
10 * 10 *
(...skipping 846 matching lines...) Expand 10 before | Expand all | Expand 10 after
857 layout, 857 layout,
858 generateThumbnail, 858 generateThumbnail,
859 fileName, 859 fileName,
860 success, 860 success,
861 failure) { 861 failure) {
862 var self = this; 862 var self = this;
863 var onFinished = function(opt_thumbnail) { 863 var onFinished = function(opt_thumbnail) {
864 if (chrome.runtime.lastError != undefined) { 864 if (chrome.runtime.lastError != undefined) {
865 self.showError_(chrome.runtime.lastError.message); 865 self.showError_(chrome.runtime.lastError.message);
866 $('set-wallpaper-layout').disabled = true; 866 $('set-wallpaper-layout').disabled = true;
867 failure();
867 } else { 868 } else {
868 success(opt_thumbnail); 869 success(opt_thumbnail);
869 } 870 }
870 }; 871 };
871 872
872 chrome.wallpaperPrivate.setCustomWallpaper(wallpaper, layout, 873 chrome.wallpaperPrivate.setCustomWallpaper(wallpaper, layout,
873 generateThumbnail, 874 generateThumbnail,
874 fileName, onFinished); 875 fileName, onFinished);
875 }; 876 };
876 877
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after
1017 } 1018 }
1018 } 1019 }
1019 } 1020 }
1020 this.wallpaperGrid_.dataModel = wallpapersDataModel; 1021 this.wallpaperGrid_.dataModel = wallpapersDataModel;
1021 this.wallpaperGrid_.selectedItem = selectedItem; 1022 this.wallpaperGrid_.selectedItem = selectedItem;
1022 this.wallpaperGrid_.activeItem = selectedItem; 1023 this.wallpaperGrid_.activeItem = selectedItem;
1023 } 1024 }
1024 }; 1025 };
1025 1026
1026 })(); 1027 })();
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698