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

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

Issue 2738133003: Promotes a handful of members from WmShell to Shell (Closed)
Patch Set: merge 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/test/shell_test_api.h ('k') | ash/test/test_wallpaper_delegate.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/test/shell_test_api.h" 5 #include "ash/test/shell_test_api.h"
6 6 #include "ash/common/palette_delegate.h"
7 #include "ash/common/session/session_state_delegate.h" 7 #include "ash/common/session/session_state_delegate.h"
8 #include "ash/display/display_configuration_controller.h" 8 #include "ash/display/display_configuration_controller.h"
9 #include "ash/root_window_controller.h" 9 #include "ash/root_window_controller.h"
10 #include "ash/shell.h" 10 #include "ash/shell.h"
11 11
12 namespace ash { 12 namespace ash {
13 namespace test { 13 namespace test {
14 14
15 ShellTestApi::ShellTestApi() : ShellTestApi(Shell::GetInstance()) {}
16
15 ShellTestApi::ShellTestApi(Shell* shell) : shell_(shell) {} 17 ShellTestApi::ShellTestApi(Shell* shell) : shell_(shell) {}
16 18
17 SystemGestureEventFilter* ShellTestApi::system_gesture_event_filter() { 19 SystemGestureEventFilter* ShellTestApi::system_gesture_event_filter() {
18 return shell_->system_gesture_filter_.get(); 20 return shell_->system_gesture_filter_.get();
19 } 21 }
20 22
21 WorkspaceController* ShellTestApi::workspace_controller() { 23 WorkspaceController* ShellTestApi::workspace_controller() {
22 return shell_->GetPrimaryRootWindowController()->workspace_controller(); 24 return shell_->GetPrimaryRootWindowController()->workspace_controller();
23 } 25 }
24 26
25 ScreenPositionController* ShellTestApi::screen_position_controller() { 27 ScreenPositionController* ShellTestApi::screen_position_controller() {
26 return shell_->screen_position_controller_.get(); 28 return shell_->screen_position_controller_.get();
27 } 29 }
28 30
29 AshNativeCursorManager* ShellTestApi::ash_native_cursor_manager() { 31 AshNativeCursorManager* ShellTestApi::ash_native_cursor_manager() {
30 return shell_->native_cursor_manager_; 32 return shell_->native_cursor_manager_;
31 } 33 }
32 34
33 DragDropController* ShellTestApi::drag_drop_controller() { 35 DragDropController* ShellTestApi::drag_drop_controller() {
34 return shell_->drag_drop_controller_.get(); 36 return shell_->drag_drop_controller_.get();
35 } 37 }
36 38
37 void ShellTestApi::DisableDisplayAnimator() { 39 void ShellTestApi::DisableDisplayAnimator() {
38 shell_->display_configuration_controller()->ResetAnimatorForTest(); 40 shell_->display_configuration_controller()->ResetAnimatorForTest();
39 } 41 }
40 42
43 void ShellTestApi::SetPaletteDelegate(
44 std::unique_ptr<PaletteDelegate> palette_delegate) {
45 shell_->palette_delegate_ = std::move(palette_delegate);
46 }
47
41 void ShellTestApi::SetSessionStateDelegate( 48 void ShellTestApi::SetSessionStateDelegate(
42 SessionStateDelegate* session_state_delegate) { 49 SessionStateDelegate* session_state_delegate) {
43 shell_->session_state_delegate_.reset(session_state_delegate); 50 shell_->session_state_delegate_.reset(session_state_delegate);
44 } 51 }
45 52
46 } // namespace test 53 } // namespace test
47 } // namespace ash 54 } // namespace ash
OLDNEW
« no previous file with comments | « ash/test/shell_test_api.h ('k') | ash/test/test_wallpaper_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698