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

Side by Side Diff: chrome/browser/chromeos/login/wallpaper_manager.cc

Issue 11190022: [cros] Update wallpaper when displaying Gaia frame. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Review fixes Created 8 years, 2 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/chromeos/login/wallpaper_manager.h" 5 #include "chrome/browser/chromeos/login/wallpaper_manager.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "ash/desktop_background/desktop_background_controller.h" 9 #include "ash/desktop_background/desktop_background_controller.h"
10 #include "ash/desktop_background/desktop_background_resources.h" 10 #include "ash/desktop_background/desktop_background_resources.h"
(...skipping 663 matching lines...) Expand 10 before | Expand all | Expand 10 after
674 } 674 }
675 return; 675 return;
676 } 676 }
677 ash::Shell::GetInstance()->desktop_background_controller()-> 677 ash::Shell::GetInstance()->desktop_background_controller()->
678 SetDefaultWallpaper(index, false); 678 SetDefaultWallpaper(index, false);
679 if (!new_wallpaper_ui_disabled) 679 if (!new_wallpaper_ui_disabled)
680 MigrateBuiltInWallpaper(email); 680 MigrateBuiltInWallpaper(email);
681 } 681 }
682 } 682 }
683 683
684 void WallpaperManager::SetSigninWallpaper() {
685 ash::Shell::GetInstance()->desktop_background_controller()->
686 SetDefaultWallpaper(kDefaultOOBEWallpaperIndex, false);
687 }
688
684 void WallpaperManager::SetWallpaperFromImageSkia( 689 void WallpaperManager::SetWallpaperFromImageSkia(
685 const gfx::ImageSkia& wallpaper, 690 const gfx::ImageSkia& wallpaper,
686 ash::WallpaperLayout layout) { 691 ash::WallpaperLayout layout) {
687 ash::Shell::GetInstance()->desktop_background_controller()-> 692 ash::Shell::GetInstance()->desktop_background_controller()->
688 SetCustomWallpaper(wallpaper, layout); 693 SetCustomWallpaper(wallpaper, layout);
689 } 694 }
690 695
691 void WallpaperManager::OnUserSelected(const std::string& email) {
692 SetUserWallpaper(email);
693 }
694
695 // WallpaperManager, private: -------------------------------------------------- 696 // WallpaperManager, private: --------------------------------------------------
696 697
697 WallpaperManager::~WallpaperManager() { 698 WallpaperManager::~WallpaperManager() {
698 DBusThreadManager::Get()->GetPowerManagerClient()->RemoveObserver(this); 699 DBusThreadManager::Get()->GetPowerManagerClient()->RemoveObserver(this);
699 system::TimezoneSettings::GetInstance()->RemoveObserver(this); 700 system::TimezoneSettings::GetInstance()->RemoveObserver(this);
700 weak_factory_.InvalidateWeakPtrs(); 701 weak_factory_.InvalidateWeakPtrs();
701 } 702 }
702 703
703 void WallpaperManager::BatchUpdateWallpaper() { 704 void WallpaperManager::BatchUpdateWallpaper() {
704 PrefService* local_state = g_browser_process->local_state(); 705 PrefService* local_state = g_browser_process->local_state();
(...skipping 555 matching lines...) Expand 10 before | Expand all | Expand 10 after
1260 FROM_HERE, 1261 FROM_HERE,
1261 base::Bind(&WallpaperManager::StartLoad, 1262 base::Bind(&WallpaperManager::StartLoad,
1262 base::Unretained(this), 1263 base::Unretained(this),
1263 email, 1264 email,
1264 info, 1265 info,
1265 update_wallpaper, 1266 update_wallpaper,
1266 valid_path)); 1267 valid_path));
1267 } 1268 }
1268 1269
1269 } // chromeos 1270 } // chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/login/wallpaper_manager.h ('k') | chrome/browser/chromeos/login/webui_login_display.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698