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

Side by Side Diff: ash/test/ash_test_helper.cc

Issue 2752593008: Move AcceleratorController from WmShell to Shell (Closed)
Patch Set: cleanup 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
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/test/ash_test_helper.h" 5 #include "ash/test/ash_test_helper.h"
6 6
7 #include "ash/accelerators/accelerator_controller_delegate_aura.h" 7 #include "ash/accelerators/accelerator_controller_delegate_aura.h"
8 #include "ash/aura/wm_shell_aura.h"
8 #include "ash/common/test/test_session_state_delegate.h" 9 #include "ash/common/test/test_session_state_delegate.h"
9 #include "ash/common/test/test_system_tray_delegate.h" 10 #include "ash/common/test/test_system_tray_delegate.h"
10 #include "ash/common/test/wm_shell_test_api.h" 11 #include "ash/common/test/wm_shell_test_api.h"
11 #include "ash/common/wm_shell.h" 12 #include "ash/common/wm_shell.h"
12 #include "ash/common/wm_window.h" 13 #include "ash/common/wm_window.h"
13 #include "ash/mus/screen_mus.h" 14 #include "ash/mus/screen_mus.h"
14 #include "ash/mus/window_manager.h" 15 #include "ash/mus/window_manager.h"
15 #include "ash/mus/window_manager_application.h" 16 #include "ash/mus/window_manager_application.h"
16 #include "ash/shell.h" 17 #include "ash/shell.h"
17 #include "ash/shell_init_params.h" 18 #include "ash/shell_init_params.h"
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
156 157
157 // DisplayManager is specific to classic-ash. 158 // DisplayManager is specific to classic-ash.
158 display::test::DisplayManagerTestApi( 159 display::test::DisplayManagerTestApi(
159 Shell::GetInstance()->display_manager()) 160 Shell::GetInstance()->display_manager())
160 .DisableChangeDisplayUponHostResize(); 161 .DisableChangeDisplayUponHostResize();
161 ShellTestApi(shell).DisableDisplayAnimator(); 162 ShellTestApi(shell).DisableDisplayAnimator();
162 163
163 // TODO: disabled for mash as AcceleratorControllerDelegateAura isn't 164 // TODO: disabled for mash as AcceleratorControllerDelegateAura isn't
164 // created in mash http://crbug.com/632111. 165 // created in mash http://crbug.com/632111.
165 test_screenshot_delegate_ = new TestScreenshotDelegate(); 166 test_screenshot_delegate_ = new TestScreenshotDelegate();
166 shell->accelerator_controller_delegate()->SetScreenshotDelegate( 167 WmShellAura::Get()
167 std::unique_ptr<ScreenshotDelegate>(test_screenshot_delegate_)); 168 ->accelerator_controller_delegate()
169 ->SetScreenshotDelegate(
170 std::unique_ptr<ScreenshotDelegate>(test_screenshot_delegate_));
168 } 171 }
169 } 172 }
170 173
171 void AshTestHelper::TearDown() { 174 void AshTestHelper::TearDown() {
172 window_manager_app_.reset(); 175 window_manager_app_.reset();
173 176
174 const bool is_mash = IsMash(); 177 const bool is_mash = IsMash();
175 178
176 // WindowManger owns the Shell in mash. 179 // WindowManger owns the Shell in mash.
177 if (!is_mash) 180 if (!is_mash)
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after
364 std::set<RootWindowController*> roots = 367 std::set<RootWindowController*> roots =
365 window_manager_app_->window_manager()->GetRootWindowControllers(); 368 window_manager_app_->window_manager()->GetRootWindowControllers();
366 std::vector<RootWindowController*> ordered_roots; 369 std::vector<RootWindowController*> ordered_roots;
367 ordered_roots.insert(ordered_roots.begin(), roots.begin(), roots.end()); 370 ordered_roots.insert(ordered_roots.begin(), roots.begin(), roots.end());
368 std::sort(ordered_roots.begin(), ordered_roots.end(), &CompareByDisplayId); 371 std::sort(ordered_roots.begin(), ordered_roots.end(), &CompareByDisplayId);
369 return ordered_roots; 372 return ordered_roots;
370 } 373 }
371 374
372 } // namespace test 375 } // namespace test
373 } // namespace ash 376 } // namespace ash
OLDNEW
« ash/common/wm_shell.h ('K') | « ash/shell.cc ('k') | ash/wm/power_button_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698