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

Side by Side Diff: ash/content/display/screen_orientation_controller_chromeos_unittest.cc

Issue 2113053003: Moves Shell::maximize_mode_controller() to WmShell (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: order Created 4 years, 5 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/wm_shell.cc ('k') | ash/display/screen_orientation_controller_chromeos.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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/display/screen_orientation_controller_chromeos.h" 5 #include "ash/display/screen_orientation_controller_chromeos.h"
6 6
7 #include <memory> 7 #include <memory>
8 #include <vector> 8 #include <vector>
9 9
10 #include "ash/common/ash_switches.h" 10 #include "ash/common/ash_switches.h"
11 #include "ash/common/display/display_info.h" 11 #include "ash/common/display/display_info.h"
12 #include "ash/common/wm/maximize_mode/maximize_mode_controller.h" 12 #include "ash/common/wm/maximize_mode/maximize_mode_controller.h"
13 #include "ash/common/wm_shell.h"
13 #include "ash/content/shell_content_state.h" 14 #include "ash/content/shell_content_state.h"
14 #include "ash/display/display_manager.h" 15 #include "ash/display/display_manager.h"
15 #include "ash/shell.h" 16 #include "ash/shell.h"
16 #include "ash/test/ash_test_base.h" 17 #include "ash/test/ash_test_base.h"
17 #include "ash/test/ash_test_helper.h" 18 #include "ash/test/ash_test_helper.h"
18 #include "ash/test/content/test_shell_content_state.h" 19 #include "ash/test/content/test_shell_content_state.h"
19 #include "ash/test/display_manager_test_api.h" 20 #include "ash/test/display_manager_test_api.h"
20 #include "ash/test/test_shell_delegate.h" 21 #include "ash/test/test_shell_delegate.h"
21 #include "ash/test/test_system_tray_delegate.h" 22 #include "ash/test/test_system_tray_delegate.h"
22 #include "base/command_line.h" 23 #include "base/command_line.h"
(...skipping 18 matching lines...) Expand all
41 const float kDegreesToRadians = 3.1415926f / 180.0f; 42 const float kDegreesToRadians = 3.1415926f / 180.0f;
42 const float kMeanGravity = -9.8066f; 43 const float kMeanGravity = -9.8066f;
43 44
44 DisplayInfo CreateDisplayInfo(int64_t id, const gfx::Rect& bounds) { 45 DisplayInfo CreateDisplayInfo(int64_t id, const gfx::Rect& bounds) {
45 DisplayInfo info(id, "dummy", false); 46 DisplayInfo info(id, "dummy", false);
46 info.SetBounds(bounds); 47 info.SetBounds(bounds);
47 return info; 48 return info;
48 } 49 }
49 50
50 void EnableMaximizeMode(bool enable) { 51 void EnableMaximizeMode(bool enable) {
51 Shell::GetInstance() 52 WmShell::Get()->maximize_mode_controller()->EnableMaximizeModeWindowManager(
52 ->maximize_mode_controller() 53 enable);
53 ->EnableMaximizeModeWindowManager(enable);
54 } 54 }
55 55
56 bool RotationLocked() { 56 bool RotationLocked() {
57 return Shell::GetInstance() 57 return Shell::GetInstance()
58 ->screen_orientation_controller() 58 ->screen_orientation_controller()
59 ->rotation_locked(); 59 ->rotation_locked();
60 } 60 }
61 61
62 void SetDisplayRotationById(int64_t display_id, 62 void SetDisplayRotationById(int64_t display_id,
63 display::Display::Rotation rotation) { 63 display::Display::Rotation rotation) {
(...skipping 586 matching lines...) Expand 10 before | Expand all | Expand 10 after
650 650
651 Shell::GetInstance()->screen_orientation_controller()->SetDisplayRotation( 651 Shell::GetInstance()->screen_orientation_controller()->SetDisplayRotation(
652 kNewRotation, display::Display::ROTATION_SOURCE_ACTIVE); 652 kNewRotation, display::Display::ROTATION_SOURCE_ACTIVE);
653 653
654 EXPECT_EQ( 654 EXPECT_EQ(
655 kNewRotation, 655 kNewRotation,
656 display_manager->GetDisplayInfo(kInternalDisplayId).GetActiveRotation()); 656 display_manager->GetDisplayInfo(kInternalDisplayId).GetActiveRotation());
657 } 657 }
658 658
659 } // namespace ash 659 } // namespace ash
OLDNEW
« no previous file with comments | « ash/common/wm_shell.cc ('k') | ash/display/screen_orientation_controller_chromeos.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698