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

Side by Side Diff: ash/accelerators/debug_commands.cc

Issue 208273005: If customization includes default wallpaper, download and apply it. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Update after-review. Created 6 years, 8 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
« no previous file with comments | « no previous file | ash/desktop_background/desktop_background_controller.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
OLDNEW
« no previous file with comments | « no previous file | ash/desktop_background/desktop_background_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698