Chromium Code Reviews| OLD | NEW |
|---|---|
| (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 | |
| OLD | NEW |