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

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

Issue 1594683002: Introduce DisplayConfigurationController (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@issue_576375_display1b1
Patch Set: Rebase Created 4 years, 11 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 (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
7 #include "ash/root_window_controller.h" 7 #include "ash/root_window_controller.h"
8 #include "ash/session/session_state_delegate.h" 8 #include "ash/session/session_state_delegate.h"
9 #include "ash/shelf/shelf_delegate.h" 9 #include "ash/shelf/shelf_delegate.h"
10 #include "ash/shell.h" 10 #include "ash/shell.h"
11 11
12 #if defined(OS_CHROMEOS) 12 #if defined(OS_CHROMEOS)
13 #include "ash/display/display_animator.h" 13 #include "ash/display/display_configuration_controller.h"
14 #include "ui/display/chromeos/display_configurator.h" 14 #include "ui/display/chromeos/display_configurator.h"
15 #endif 15 #endif
16 16
17 namespace ash { 17 namespace ash {
18 namespace test { 18 namespace test {
19 19
20 ShellTestApi::ShellTestApi(Shell* shell) : shell_(shell) {} 20 ShellTestApi::ShellTestApi(Shell* shell) : shell_(shell) {}
21 21
22 RootWindowLayoutManager* ShellTestApi::root_window_layout() { 22 RootWindowLayoutManager* ShellTestApi::root_window_layout() {
23 return shell_->GetPrimaryRootWindowController()->root_window_layout(); 23 return shell_->GetPrimaryRootWindowController()->root_window_layout();
(...skipping 22 matching lines...) Expand all
46 DragDropController* ShellTestApi::drag_drop_controller() { 46 DragDropController* ShellTestApi::drag_drop_controller() {
47 return shell_->drag_drop_controller_.get(); 47 return shell_->drag_drop_controller_.get();
48 } 48 }
49 49
50 AppListController* ShellTestApi::app_list_controller() { 50 AppListController* ShellTestApi::app_list_controller() {
51 return shell_->app_list_controller_.get(); 51 return shell_->app_list_controller_.get();
52 } 52 }
53 53
54 void ShellTestApi::DisableDisplayAnimator() { 54 void ShellTestApi::DisableDisplayAnimator() {
55 #if defined(OS_CHROMEOS) 55 #if defined(OS_CHROMEOS)
56 if (shell_->display_animator_) { 56 shell_->display_configuration_controller()->ResetAnimatorForTest();
57 shell_->display_configurator_->RemoveObserver(
58 shell_->display_animator_.get());
59 shell_->display_animator_.reset();
60 }
61 #endif // defined(OS_CHROMEOS) 57 #endif // defined(OS_CHROMEOS)
62 } 58 }
63 59
64 void ShellTestApi::SetShelfDelegate(ShelfDelegate* delegate) { 60 void ShellTestApi::SetShelfDelegate(ShelfDelegate* delegate) {
65 shell_->shelf_delegate_.reset(delegate); 61 shell_->shelf_delegate_.reset(delegate);
66 } 62 }
67 63
68 void ShellTestApi::SetSessionStateDelegate( 64 void ShellTestApi::SetSessionStateDelegate(
69 SessionStateDelegate* session_state_delegate) { 65 SessionStateDelegate* session_state_delegate) {
70 shell_->session_state_delegate_.reset(session_state_delegate); 66 shell_->session_state_delegate_.reset(session_state_delegate);
71 } 67 }
72 68
73 } // namespace test 69 } // namespace test
74 } // namespace ash 70 } // namespace ash
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698