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

Side by Side Diff: ash/common/wallpaper/wallpaper_controller_unittest.cc

Issue 2741273002: chromeos: Promotes more from WmShell to Shell (Closed)
Patch Set: feedback Created 3 years, 9 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/common/wallpaper/wallpaper_controller.cc ('k') | ash/common/wallpaper/wallpaper_view.cc » ('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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/wallpaper/wallpaper_controller.h" 5 #include "ash/common/wallpaper/wallpaper_controller.h"
6 6
7 #include <cmath> 7 #include <cmath>
8 #include <cstdlib> 8 #include <cstdlib>
9 9
10 #include "ash/common/wallpaper/wallpaper_view.h" 10 #include "ash/common/wallpaper/wallpaper_view.h"
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 void SetUp() override { 111 void SetUp() override {
112 test::AshTestBase::SetUp(); 112 test::AshTestBase::SetUp();
113 // Ash shell initialization creates wallpaper. Reset it so we can manually 113 // Ash shell initialization creates wallpaper. Reset it so we can manually
114 // control wallpaper creation and animation in our tests. 114 // control wallpaper creation and animation in our tests.
115 RootWindowController* root_window_controller = 115 RootWindowController* root_window_controller =
116 WmShell::Get()->GetPrimaryRootWindow()->GetRootWindowController(); 116 WmShell::Get()->GetPrimaryRootWindow()->GetRootWindowController();
117 root_window_controller->SetWallpaperWidgetController(nullptr); 117 root_window_controller->SetWallpaperWidgetController(nullptr);
118 root_window_controller->SetAnimatingWallpaperWidgetController(nullptr); 118 root_window_controller->SetAnimatingWallpaperWidgetController(nullptr);
119 controller_ = Shell::GetInstance()->wallpaper_controller(); 119 controller_ = Shell::GetInstance()->wallpaper_controller();
120 wallpaper_delegate_ = static_cast<test::TestWallpaperDelegate*>( 120 wallpaper_delegate_ = static_cast<test::TestWallpaperDelegate*>(
121 WmShell::Get()->wallpaper_delegate()); 121 Shell::Get()->wallpaper_delegate());
122 controller_->set_wallpaper_reload_delay_for_test(0); 122 controller_->set_wallpaper_reload_delay_for_test(0);
123 } 123 }
124 124
125 WallpaperView* wallpaper_view() { 125 WallpaperView* wallpaper_view() {
126 WallpaperWidgetController* controller = 126 WallpaperWidgetController* controller =
127 WmShell::Get() 127 WmShell::Get()
128 ->GetPrimaryRootWindow() 128 ->GetPrimaryRootWindow()
129 ->GetRootWindowController() 129 ->GetRootWindowController()
130 ->animating_wallpaper_widget_controller() 130 ->animating_wallpaper_widget_controller()
131 ->GetController(false); 131 ->GetController(false);
(...skipping 337 matching lines...) Expand 10 before | Expand all | Expand 10 after
469 { 469 {
470 SCOPED_TRACE(base::StringPrintf("1200x600/u@1.5 low resolution")); 470 SCOPED_TRACE(base::StringPrintf("1200x600/u@1.5 low resolution"));
471 controller_->SetWallpaperImage(image_low_res, WALLPAPER_LAYOUT_CENTER); 471 controller_->SetWallpaperImage(image_low_res, WALLPAPER_LAYOUT_CENTER);
472 WallpaperFitToNativeResolution( 472 WallpaperFitToNativeResolution(
473 wallpaper_view(), low_dsf, low_resolution.width(), 473 wallpaper_view(), low_dsf, low_resolution.width(),
474 low_resolution.height(), kCustomWallpaperColor); 474 low_resolution.height(), kCustomWallpaperColor);
475 } 475 }
476 } 476 }
477 477
478 } // namespace ash 478 } // namespace ash
OLDNEW
« no previous file with comments | « ash/common/wallpaper/wallpaper_controller.cc ('k') | ash/common/wallpaper/wallpaper_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698