OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 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 "ash/accelerators/accelerator_commands.h" | 5 #include "ash/accelerators/accelerator_commands.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/user_wallpaper_delegate.h" | 8 #include "ash/desktop_background/user_wallpaper_delegate.h" |
9 #include "ash/shell.h" | 9 #include "ash/shell.h" |
10 #include "third_party/skia/include/core/SkColor.h" | 10 #include "third_party/skia/include/core/SkColor.h" |
(...skipping 26 matching lines...) Expand all Loading... |
37 bool CycleDesktopBackgroundMode() { | 37 bool CycleDesktopBackgroundMode() { |
38 static int index = 0; | 38 static int index = 0; |
39 DesktopBackgroundController* desktop_background_controller = | 39 DesktopBackgroundController* desktop_background_controller = |
40 Shell::GetInstance()->desktop_background_controller(); | 40 Shell::GetInstance()->desktop_background_controller(); |
41 switch (++index % 4) { | 41 switch (++index % 4) { |
42 case 0: | 42 case 0: |
43 ash::Shell::GetInstance()->user_wallpaper_delegate()-> | 43 ash::Shell::GetInstance()->user_wallpaper_delegate()-> |
44 InitializeWallpaper(); | 44 InitializeWallpaper(); |
45 break; | 45 break; |
46 case 1: | 46 case 1: |
47 desktop_background_controller->SetCustomWallpaper( | 47 desktop_background_controller->SetWallpaper( |
48 CreateWallpaperImage(SK_ColorRED, SK_ColorBLUE), | 48 CreateWallpaperImage(SK_ColorRED, SK_ColorBLUE), |
49 WALLPAPER_LAYOUT_STRETCH); | 49 WALLPAPER_LAYOUT_STRETCH); |
50 break; | 50 break; |
51 case 2: | 51 case 2: |
52 desktop_background_controller->SetCustomWallpaper( | 52 desktop_background_controller->SetWallpaper( |
53 CreateWallpaperImage(SK_ColorBLUE, SK_ColorGREEN), | 53 CreateWallpaperImage(SK_ColorBLUE, SK_ColorGREEN), |
54 WALLPAPER_LAYOUT_CENTER); | 54 WALLPAPER_LAYOUT_CENTER); |
55 break; | 55 break; |
56 case 3: | 56 case 3: |
57 desktop_background_controller->SetCustomWallpaper( | 57 desktop_background_controller->SetWallpaper( |
58 CreateWallpaperImage(SK_ColorGREEN, SK_ColorRED), | 58 CreateWallpaperImage(SK_ColorGREEN, SK_ColorRED), |
59 WALLPAPER_LAYOUT_CENTER_CROPPED); | 59 WALLPAPER_LAYOUT_CENTER_CROPPED); |
60 break; | 60 break; |
61 } | 61 } |
62 return true; | 62 return true; |
63 } | 63 } |
64 | 64 |
65 } // namespace debug | 65 } // namespace debug |
66 } // namespace ash | 66 } // namespace ash |
OLD | NEW |