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

Side by Side Diff: ash/sysui/user_wallpaper_delegate_mus.cc

Issue 2235493002: mash: Disable ash_sysui; begin removal. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Connect to chrome on mash session launch; add missing gn dep. Created 4 years, 4 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 | « ash/sysui/user_wallpaper_delegate_mus.h ('k') | chrome/app/mash/BUILD.gn » ('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 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/sysui/user_wallpaper_delegate_mus.h" 5 #include "ash/sysui/user_wallpaper_delegate_mus.h"
6 6
7 #include "ash/desktop_background/desktop_background_controller.h" 7 #include "ash/desktop_background/desktop_background_controller.h"
8 #include "ash/shell.h" 8 #include "ash/shell.h"
9 #include "components/wallpaper/wallpaper_layout.h" 9 #include "components/wallpaper/wallpaper_layout.h"
10 #include "services/shell/public/cpp/connector.h" 10 #include "services/shell/public/cpp/connector.h"
11 #include "ui/views/mus/window_manager_connection.h" 11 #include "ui/views/mus/window_manager_connection.h"
12 #include "ui/wm/core/window_animations.h" 12 #include "ui/wm/core/window_animations.h"
13 13
14 namespace { 14 namespace {
15 15
16 wallpaper::WallpaperLayout WallpaperLayoutFromMojo( 16 wallpaper::WallpaperLayout WallpaperLayoutFromMojo(
17 ash::sysui::mojom::WallpaperLayout layout) { 17 ash::mojom::WallpaperLayout layout) {
18 switch (layout) { 18 switch (layout) {
19 case ash::sysui::mojom::WallpaperLayout::CENTER: 19 case ash::mojom::WallpaperLayout::CENTER:
20 return wallpaper::WALLPAPER_LAYOUT_CENTER; 20 return wallpaper::WALLPAPER_LAYOUT_CENTER;
21 case ash::sysui::mojom::WallpaperLayout::CENTER_CROPPED: 21 case ash::mojom::WallpaperLayout::CENTER_CROPPED:
22 return wallpaper::WALLPAPER_LAYOUT_CENTER_CROPPED; 22 return wallpaper::WALLPAPER_LAYOUT_CENTER_CROPPED;
23 case ash::sysui::mojom::WallpaperLayout::STRETCH: 23 case ash::mojom::WallpaperLayout::STRETCH:
24 return wallpaper::WALLPAPER_LAYOUT_STRETCH; 24 return wallpaper::WALLPAPER_LAYOUT_STRETCH;
25 case ash::sysui::mojom::WallpaperLayout::TILE: 25 case ash::mojom::WallpaperLayout::TILE:
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 namespace sysui { 35 namespace sysui {
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 mojom::WallpaperLayout layout) { 83 mojom::WallpaperLayout layout) {
84 if (wallpaper.isNull()) 84 if (wallpaper.isNull())
85 return; 85 return;
86 gfx::ImageSkia image = gfx::ImageSkia::CreateFrom1xBitmap(wallpaper); 86 gfx::ImageSkia image = gfx::ImageSkia::CreateFrom1xBitmap(wallpaper);
87 Shell::GetInstance()->desktop_background_controller()->SetWallpaperImage( 87 Shell::GetInstance()->desktop_background_controller()->SetWallpaperImage(
88 image, WallpaperLayoutFromMojo(layout)); 88 image, WallpaperLayoutFromMojo(layout));
89 } 89 }
90 90
91 } // namespace sysui 91 } // namespace sysui
92 } // namespace ash 92 } // namespace ash
OLDNEW
« no previous file with comments | « ash/sysui/user_wallpaper_delegate_mus.h ('k') | chrome/app/mash/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698