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

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

Issue 24175004: Remove dependency on ui::ScaleFactor from ui/gfx (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 3 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) 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 #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/shell.h" 9 #include "ash/shell.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 424 matching lines...) Expand 10 before | Expand all | Expand 10 after
435 // If decoded wallpaper is empty, we are probably failed to decode the file. 435 // If decoded wallpaper is empty, we are probably failed to decode the file.
436 // Use default wallpaper in this case. 436 // Use default wallpaper in this case.
437 if (wallpaper.image().isNull()) { 437 if (wallpaper.image().isNull()) {
438 SetDefaultWallpaper(); 438 SetDefaultWallpaper();
439 return; 439 return;
440 } 440 }
441 441
442 bool is_persistent = 442 bool is_persistent =
443 !UserManager::Get()->IsUserNonCryptohomeDataEphemeral(username); 443 !UserManager::Get()->IsUserNonCryptohomeDataEphemeral(username);
444 444
445 wallpaper.image().EnsureRepsForSupportedScaleFactors(); 445 wallpaper.image().EnsureRepsForSupportedScales();
446 scoped_ptr<gfx::ImageSkia> deep_copy(wallpaper.image().DeepCopy()); 446 scoped_ptr<gfx::ImageSkia> deep_copy(wallpaper.image().DeepCopy());
447 447
448 WallpaperInfo wallpaper_info = { 448 WallpaperInfo wallpaper_info = {
449 wallpaper_path.value(), 449 wallpaper_path.value(),
450 layout, 450 layout,
451 type, 451 type,
452 // Date field is not used. 452 // Date field is not used.
453 base::Time::Now().LocalMidnight() 453 base::Time::Now().LocalMidnight()
454 }; 454 };
455 // Block shutdown on this task. Otherwise, we may lost the custom wallpaper 455 // Block shutdown on this task. Otherwise, we may lost the custom wallpaper
(...skipping 635 matching lines...) Expand 10 before | Expand all | Expand 10 after
1091 // |sequence_token_| here. 1091 // |sequence_token_| here.
1092 wallpaper_loader_->Start(wallpaper_path.value(), 0, sequence_token_, 1092 wallpaper_loader_->Start(wallpaper_path.value(), 0, sequence_token_,
1093 base::Bind(&WallpaperManager::OnWallpaperDecoded, 1093 base::Bind(&WallpaperManager::OnWallpaperDecoded,
1094 base::Unretained(this), 1094 base::Unretained(this),
1095 email, 1095 email,
1096 info.layout, 1096 info.layout,
1097 update_wallpaper)); 1097 update_wallpaper));
1098 } 1098 }
1099 1099
1100 } // namespace chromeos 1100 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698