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

Side by Side Diff: ash/desktop_background/desktop_background_controller.cc

Issue 9580023: Enable user change background image in settings page in Aura build. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Fix a debug build error associated with color mode switch Created 8 years, 9 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
(Empty)
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
3 // found in the LICENSE file.
4
5 #include "ash/desktop_background/desktop_background_controller.h"
6
7 #include "ash/desktop_background/desktop_background_resources.h"
8 #include "ash/shell.h"
9 #include "base/logging.h"
10 #include "grit/ui_resources.h"
11 #include "ui/gfx/image/image.h"
12 #include "ui/base/resource/resource_bundle.h"
13
14 namespace ash {
15
16 DesktopBackgroundController::DesktopBackgroundController() :
17 previous_wallpaper_index_(GetPresetWallpaperIndex()) {
18 }
19
20 DesktopBackgroundController::~DesktopBackgroundController() {
21 }
22
23 void DesktopBackgroundController::OnDesktopBackgroundChange(int index) {
24 Shell::GetInstance()->SetDesktopBackgroundWallpaper(
25 GetDefaultWallpaper(index));
26 previous_wallpaper_index_ = index;
27 }
28
29 const SkBitmap& DesktopBackgroundController::GetPreviouseWallpaper() {
30 return GetDefaultWallpaper(previous_wallpaper_index_);
31 }
32
Ben Goodger (Google) 2012/03/09 23:20:17 function order in .cc should match .h
bshe 2012/03/12 00:14:25 Done.
33 const SkBitmap& DesktopBackgroundController::GetPresetWallpaper() {
34 return GetDefaultWallpaper(GetPresetWallpaperIndex());
35 }
36
37 } // namespace ash
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698