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

Side by Side Diff: chrome/browser/ui/webui/options2/chromeos/set_wallpaper_options_handler2.cc

Issue 10207030: Asynchronously load wallpapers when user pod is selected. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Nits Created 8 years, 7 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 #include "chrome/browser/ui/webui/options2/chromeos/set_wallpaper_options_handle r2.h" 5 #include "chrome/browser/ui/webui/options2/chromeos/set_wallpaper_options_handle r2.h"
6 6
7 #include "ash/desktop_background/desktop_background_controller.h" 7 #include "ash/desktop_background/desktop_background_controller.h"
8 #include "ash/desktop_background/desktop_background_resources.h" 8 #include "ash/desktop_background/desktop_background_resources.h"
9 #include "ash/shell.h" 9 #include "ash/shell.h"
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 !args->GetString(0, &image_url)) 99 !args->GetString(0, &image_url))
100 NOTREACHED(); 100 NOTREACHED();
101 101
102 if (image_url.empty()) 102 if (image_url.empty())
103 return; 103 return;
104 104
105 int user_image_index; 105 int user_image_index;
106 if (IsDefaultWallpaperURL(image_url, &user_image_index)) { 106 if (IsDefaultWallpaperURL(image_url, &user_image_index)) {
107 UserManager::Get()->SaveUserWallpaperIndex(user_image_index); 107 UserManager::Get()->SaveUserWallpaperIndex(user_image_index);
108 ash::Shell::GetInstance()->desktop_background_controller()-> 108 ash::Shell::GetInstance()->desktop_background_controller()->
109 SetDesktopBackgroundImageMode(); 109 SetLoggedInUserWallpaper();
110 } 110 }
111 } 111 }
112 112
113 gfx::NativeWindow SetWallpaperOptionsHandler::GetBrowserWindow() const { 113 gfx::NativeWindow SetWallpaperOptionsHandler::GetBrowserWindow() const {
114 Browser* browser = 114 Browser* browser =
115 BrowserList::FindBrowserWithProfile(Profile::FromWebUI(web_ui())); 115 BrowserList::FindBrowserWithProfile(Profile::FromWebUI(web_ui()));
116 if (!browser) 116 if (!browser)
117 return NULL; 117 return NULL;
118 return browser->window()->GetNativeHandle(); 118 return browser->window()->GetNativeHandle();
119 } 119 }
120 120
121 } // namespace options2 121 } // namespace options2
122 } // namespace chromeos 122 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/chromeos/login/signin_screen_handler.cc ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698