| OLD | NEW |
| 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 "ui/display/manager/display_manager.h" | 5 #include "ui/display/manager/display_manager.h" |
| 6 | 6 |
| 7 #include "ash/accelerators/accelerator_commands_aura.h" | 7 #include "ash/accelerators/accelerator_commands_aura.h" |
| 8 #include "ash/ash_switches.h" | 8 #include "ash/ash_switches.h" |
| 9 #include "ash/display/display_configuration_controller.h" | 9 #include "ash/display/display_configuration_controller.h" |
| 10 #include "ash/display/display_util.h" | 10 #include "ash/display/display_util.h" |
| (...skipping 2942 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2953 scoped_refptr<chromeos::AccelerometerUpdate> portrait_secondary = | 2953 scoped_refptr<chromeos::AccelerometerUpdate> portrait_secondary = |
| 2954 new chromeos::AccelerometerUpdate(); | 2954 new chromeos::AccelerometerUpdate(); |
| 2955 | 2955 |
| 2956 private: | 2956 private: |
| 2957 DISALLOW_COPY_AND_ASSIGN(DisplayManagerOrientationTest); | 2957 DISALLOW_COPY_AND_ASSIGN(DisplayManagerOrientationTest); |
| 2958 }; | 2958 }; |
| 2959 | 2959 |
| 2960 class TestObserver : public ScreenOrientationController::Observer { | 2960 class TestObserver : public ScreenOrientationController::Observer { |
| 2961 public: | 2961 public: |
| 2962 TestObserver() {} | 2962 TestObserver() {} |
| 2963 ~TestObserver() override{}; | 2963 ~TestObserver() override {} |
| 2964 | 2964 |
| 2965 void OnUserRotationLockChanged() override { count_++; } | 2965 void OnUserRotationLockChanged() override { count_++; } |
| 2966 | 2966 |
| 2967 int countAndReset() { | 2967 int countAndReset() { |
| 2968 int tmp = count_; | 2968 int tmp = count_; |
| 2969 count_ = 0; | 2969 count_ = 0; |
| 2970 return tmp; | 2970 return tmp; |
| 2971 } | 2971 } |
| 2972 | 2972 |
| 2973 private: | 2973 private: |
| (...skipping 233 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3207 test_api.GetCurrentOrientation()); | 3207 test_api.GetCurrentOrientation()); |
| 3208 | 3208 |
| 3209 // The orientation has alraedy been locked to secondary once, so | 3209 // The orientation has alraedy been locked to secondary once, so |
| 3210 // it should swtich back to the portrait secondary. | 3210 // it should swtich back to the portrait secondary. |
| 3211 wm::ActivateWindow(window_ps); | 3211 wm::ActivateWindow(window_ps); |
| 3212 EXPECT_EQ(blink::kWebScreenOrientationLockPortraitSecondary, | 3212 EXPECT_EQ(blink::kWebScreenOrientationLockPortraitSecondary, |
| 3213 test_api.GetCurrentOrientation()); | 3213 test_api.GetCurrentOrientation()); |
| 3214 } | 3214 } |
| 3215 | 3215 |
| 3216 } // namespace ash | 3216 } // namespace ash |
| OLD | NEW |