| 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/ash_switches.h" | 10 #include "ash/ash_switches.h" |
| 11 #include "ash/content/shell_content_state.h" | 11 #include "ash/content/shell_content_state.h" |
| 12 #include "ash/display/screen_orientation_controller_chromeos.h" | 12 #include "ash/display/screen_orientation_controller_chromeos.h" |
| 13 #include "ash/shared/app_types.h" | 13 #include "ash/shared/app_types.h" |
| 14 #include "ash/shell.h" | 14 #include "ash/shell.h" |
| 15 #include "ash/system/screen_layout_observer.h" | 15 #include "ash/system/screen_layout_observer.h" |
| 16 #include "ash/test/ash_test_base.h" | 16 #include "ash/test/ash_test_base.h" |
| 17 #include "ash/test/ash_test_environment_content.h" | 17 #include "ash/test/ash_test_environment_content.h" |
| 18 #include "ash/test/ash_test_helper.h" | 18 #include "ash/test/ash_test_helper.h" |
| 19 #include "ash/test/content/test_shell_content_state.h" | 19 #include "ash/test/content/test_shell_content_state.h" |
| 20 #include "ash/test/screen_orientation_controller_test_api.h" | 20 #include "ash/test/screen_orientation_controller_test_api.h" |
| 21 #include "ash/test/test_shell_delegate.h" | 21 #include "ash/test/test_shell_delegate.h" |
| 22 #include "ash/test/test_system_tray_delegate.h" | 22 #include "ash/test/test_system_tray_delegate.h" |
| 23 #include "ash/wm/maximize_mode/maximize_mode_controller.h" | 23 #include "ash/wm/maximize_mode/maximize_mode_controller.h" |
| 24 #include "ash/wm/window_state.h" | 24 #include "ash/wm/window_state.h" |
| 25 #include "ash/wm_shell.h" | |
| 26 #include "ash/wm_window.h" | 25 #include "ash/wm_window.h" |
| 27 #include "base/command_line.h" | 26 #include "base/command_line.h" |
| 28 #include "chromeos/accelerometer/accelerometer_reader.h" | 27 #include "chromeos/accelerometer/accelerometer_reader.h" |
| 29 #include "chromeos/accelerometer/accelerometer_types.h" | 28 #include "chromeos/accelerometer/accelerometer_types.h" |
| 30 #include "content/public/browser/browser_context.h" | 29 #include "content/public/browser/browser_context.h" |
| 31 #include "content/public/browser/web_contents.h" | 30 #include "content/public/browser/web_contents.h" |
| 32 #include "content/public/test/test_browser_context.h" | 31 #include "content/public/test/test_browser_context.h" |
| 33 #include "third_party/WebKit/public/platform/modules/screen_orientation/WebScree
nOrientationLockType.h" | 32 #include "third_party/WebKit/public/platform/modules/screen_orientation/WebScree
nOrientationLockType.h" |
| 34 #include "ui/aura/window.h" | 33 #include "ui/aura/window.h" |
| 35 #include "ui/display/display.h" | 34 #include "ui/display/display.h" |
| (...skipping 757 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 793 delegate()->Lock(content2.get(), blink::kWebScreenOrientationLockLandscape); | 792 delegate()->Lock(content2.get(), blink::kWebScreenOrientationLockLandscape); |
| 794 EXPECT_EQ(display::Display::ROTATE_0, GetCurrentInternalDisplayRotation()); | 793 EXPECT_EQ(display::Display::ROTATE_0, GetCurrentInternalDisplayRotation()); |
| 795 | 794 |
| 796 delegate()->Lock(content1.get(), blink::kWebScreenOrientationLockAny); | 795 delegate()->Lock(content1.get(), blink::kWebScreenOrientationLockAny); |
| 797 activation_client->ActivateWindow(focus_window1.get()); | 796 activation_client->ActivateWindow(focus_window1.get()); |
| 798 // Switching back to any will rotate to user rotation. | 797 // Switching back to any will rotate to user rotation. |
| 799 EXPECT_EQ(display::Display::ROTATE_90, GetCurrentInternalDisplayRotation()); | 798 EXPECT_EQ(display::Display::ROTATE_90, GetCurrentInternalDisplayRotation()); |
| 800 } | 799 } |
| 801 | 800 |
| 802 } // namespace ash | 801 } // namespace ash |
| OLD | NEW |