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/common/accelerators/debug_commands.h" | 5 #include "ash/common/accelerators/debug_commands.h" |
6 | 6 |
7 #include "ash/common/accelerators/accelerator_commands.h" | 7 #include "ash/common/accelerators/accelerator_commands.h" |
8 #include "ash/common/ash_switches.h" | 8 #include "ash/common/ash_switches.h" |
9 #include "ash/common/shell_delegate.h" | 9 #include "ash/common/shell_delegate.h" |
10 #include "ash/common/system/toast/toast_data.h" | 10 #include "ash/common/system/toast/toast_data.h" |
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
85 LOG(ERROR) << out.str(); | 85 LOG(ERROR) << out.str(); |
86 } | 86 } |
87 } | 87 } |
88 | 88 |
89 gfx::ImageSkia CreateWallpaperImage(SkColor fill, SkColor rect) { | 89 gfx::ImageSkia CreateWallpaperImage(SkColor fill, SkColor rect) { |
90 // TODO(oshima): Consider adding a command line option to control wallpaper | 90 // TODO(oshima): Consider adding a command line option to control wallpaper |
91 // images for testing. The size is randomly picked. | 91 // images for testing. The size is randomly picked. |
92 gfx::Size image_size(1366, 768); | 92 gfx::Size image_size(1366, 768); |
93 gfx::Canvas canvas(image_size, 1.0f, true); | 93 gfx::Canvas canvas(image_size, 1.0f, true); |
94 canvas.DrawColor(fill); | 94 canvas.DrawColor(fill); |
95 SkPaint paint; | 95 cc::PaintFlags paint; |
96 paint.setColor(rect); | 96 paint.setColor(rect); |
97 paint.setStrokeWidth(10); | 97 paint.setStrokeWidth(10); |
98 paint.setStyle(SkPaint::kStroke_Style); | 98 paint.setStyle(cc::PaintFlags::kStroke_Style); |
99 paint.setBlendMode(SkBlendMode::kSrcOver); | 99 paint.setBlendMode(SkBlendMode::kSrcOver); |
100 canvas.DrawRoundRect(gfx::Rect(image_size), 100, paint); | 100 canvas.DrawRoundRect(gfx::Rect(image_size), 100, paint); |
101 return gfx::ImageSkia(canvas.ExtractImageRep()); | 101 return gfx::ImageSkia(canvas.ExtractImageRep()); |
102 } | 102 } |
103 | 103 |
104 void HandleToggleWallpaperMode() { | 104 void HandleToggleWallpaperMode() { |
105 static int index = 0; | 105 static int index = 0; |
106 WallpaperController* wallpaper_controller = | 106 WallpaperController* wallpaper_controller = |
107 WmShell::Get()->wallpaper_controller(); | 107 WmShell::Get()->wallpaper_controller(); |
108 switch (++index % 4) { | 108 switch (++index % 4) { |
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
213 case DEBUG_TRIGGER_CRASH: | 213 case DEBUG_TRIGGER_CRASH: |
214 HandleTriggerCrash(); | 214 HandleTriggerCrash(); |
215 break; | 215 break; |
216 default: | 216 default: |
217 break; | 217 break; |
218 } | 218 } |
219 } | 219 } |
220 | 220 |
221 } // namespace debug | 221 } // namespace debug |
222 } // namespace ash | 222 } // namespace ash |
OLD | NEW |