OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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/mus/wallpaper_delegate_mus.h" | 5 #include "ash/mus/wallpaper_delegate_mus.h" |
6 | 6 |
7 #include "ash/common/wallpaper/wallpaper_controller.h" | 7 #include "ash/common/wallpaper/wallpaper_controller.h" |
8 #include "ash/common/wm_shell.h" | 8 #include "ash/common/wm_shell.h" |
9 #include "components/wallpaper/wallpaper_layout.h" | 9 #include "components/wallpaper/wallpaper_layout.h" |
10 #include "services/service_manager/public/cpp/connector.h" | 10 #include "services/service_manager/public/cpp/connector.h" |
(...skipping 15 matching lines...) Expand all Loading... |
26 return wallpaper::WALLPAPER_LAYOUT_TILE; | 26 return wallpaper::WALLPAPER_LAYOUT_TILE; |
27 } | 27 } |
28 NOTREACHED(); | 28 NOTREACHED(); |
29 return wallpaper::WALLPAPER_LAYOUT_CENTER; | 29 return wallpaper::WALLPAPER_LAYOUT_CENTER; |
30 } | 30 } |
31 | 31 |
32 } // namespace | 32 } // namespace |
33 | 33 |
34 namespace ash { | 34 namespace ash { |
35 | 35 |
36 WallpaperDelegateMus::WallpaperDelegateMus(shell::Connector* connector) | 36 WallpaperDelegateMus::WallpaperDelegateMus( |
| 37 service_manager::Connector* connector) |
37 : connector_(connector) {} | 38 : connector_(connector) {} |
38 | 39 |
39 WallpaperDelegateMus::~WallpaperDelegateMus() {} | 40 WallpaperDelegateMus::~WallpaperDelegateMus() {} |
40 | 41 |
41 int WallpaperDelegateMus::GetAnimationType() { | 42 int WallpaperDelegateMus::GetAnimationType() { |
42 return ::wm::WINDOW_VISIBILITY_ANIMATION_TYPE_FADE; | 43 return ::wm::WINDOW_VISIBILITY_ANIMATION_TYPE_FADE; |
43 } | 44 } |
44 | 45 |
45 int WallpaperDelegateMus::GetAnimationDurationOverride() { | 46 int WallpaperDelegateMus::GetAnimationDurationOverride() { |
46 return 0; | 47 return 0; |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
81 void WallpaperDelegateMus::SetWallpaper(const SkBitmap& wallpaper, | 82 void WallpaperDelegateMus::SetWallpaper(const SkBitmap& wallpaper, |
82 mojom::WallpaperLayout layout) { | 83 mojom::WallpaperLayout layout) { |
83 if (wallpaper.isNull()) | 84 if (wallpaper.isNull()) |
84 return; | 85 return; |
85 gfx::ImageSkia image = gfx::ImageSkia::CreateFrom1xBitmap(wallpaper); | 86 gfx::ImageSkia image = gfx::ImageSkia::CreateFrom1xBitmap(wallpaper); |
86 WmShell::Get()->wallpaper_controller()->SetWallpaperImage( | 87 WmShell::Get()->wallpaper_controller()->SetWallpaperImage( |
87 image, WallpaperLayoutFromMojo(layout)); | 88 image, WallpaperLayoutFromMojo(layout)); |
88 } | 89 } |
89 | 90 |
90 } // namespace ash | 91 } // namespace ash |
OLD | NEW |