| OLD | NEW |
| 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" |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 46 const float kMeanGravity = -9.8066f; | 46 const float kMeanGravity = -9.8066f; |
| 47 | 47 |
| 48 display::ManagedDisplayInfo CreateDisplayInfo(int64_t id, | 48 display::ManagedDisplayInfo CreateDisplayInfo(int64_t id, |
| 49 const gfx::Rect& bounds) { | 49 const gfx::Rect& bounds) { |
| 50 display::ManagedDisplayInfo info(id, "dummy", false); | 50 display::ManagedDisplayInfo info(id, "dummy", false); |
| 51 info.SetBounds(bounds); | 51 info.SetBounds(bounds); |
| 52 return info; | 52 return info; |
| 53 } | 53 } |
| 54 | 54 |
| 55 void EnableMaximizeMode(bool enable) { | 55 void EnableMaximizeMode(bool enable) { |
| 56 WmShell::Get()->maximize_mode_controller()->EnableMaximizeModeWindowManager( | 56 Shell::Get()->maximize_mode_controller()->EnableMaximizeModeWindowManager( |
| 57 enable); | 57 enable); |
| 58 } | 58 } |
| 59 | 59 |
| 60 bool RotationLocked() { | 60 bool RotationLocked() { |
| 61 return Shell::GetInstance() | 61 return Shell::GetInstance() |
| 62 ->screen_orientation_controller() | 62 ->screen_orientation_controller() |
| 63 ->rotation_locked(); | 63 ->rotation_locked(); |
| 64 } | 64 } |
| 65 | 65 |
| 66 void SetDisplayRotationById(int64_t display_id, | 66 void SetDisplayRotationById(int64_t display_id, |
| (...skipping 591 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 658 | 658 |
| 659 Shell::GetInstance()->screen_orientation_controller()->SetDisplayRotation( | 659 Shell::GetInstance()->screen_orientation_controller()->SetDisplayRotation( |
| 660 kNewRotation, display::Display::ROTATION_SOURCE_ACTIVE); | 660 kNewRotation, display::Display::ROTATION_SOURCE_ACTIVE); |
| 661 | 661 |
| 662 EXPECT_EQ(kNewRotation, display_manager() | 662 EXPECT_EQ(kNewRotation, display_manager() |
| 663 ->GetDisplayInfo(kInternalDisplayId) | 663 ->GetDisplayInfo(kInternalDisplayId) |
| 664 .GetActiveRotation()); | 664 .GetActiveRotation()); |
| 665 } | 665 } |
| 666 | 666 |
| 667 } // namespace ash | 667 } // namespace ash |
| OLD | NEW |