| 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 <vector> | 5 #include <vector> |
| 6 | 6 |
| 7 #include "ash/ash_switches.h" | 7 #include "ash/ash_switches.h" |
| 8 #include "ash/content/display/screen_orientation_controller_chromeos.h" | 8 #include "ash/content/display/screen_orientation_controller_chromeos.h" |
| 9 #include "ash/display/display_info.h" | 9 #include "ash/display/display_info.h" |
| 10 #include "ash/display/display_manager.h" | 10 #include "ash/display/display_manager.h" |
| (...skipping 18 matching lines...) Expand all Loading... |
| 29 #include "ui/views/test/webview_test_helper.h" | 29 #include "ui/views/test/webview_test_helper.h" |
| 30 #include "ui/views/view.h" | 30 #include "ui/views/view.h" |
| 31 #include "ui/views/views_delegate.h" | 31 #include "ui/views/views_delegate.h" |
| 32 #include "ui/wm/public/activation_client.h" | 32 #include "ui/wm/public/activation_client.h" |
| 33 | 33 |
| 34 namespace ash { | 34 namespace ash { |
| 35 | 35 |
| 36 namespace { | 36 namespace { |
| 37 | 37 |
| 38 const float kDegreesToRadians = 3.1415926f / 180.0f; | 38 const float kDegreesToRadians = 3.1415926f / 180.0f; |
| 39 const float kMeanGravity = 9.8066f; | 39 const float kMeanGravity = -9.8066f; |
| 40 | 40 |
| 41 DisplayInfo CreateDisplayInfo(int64 id, const gfx::Rect& bounds) { | 41 DisplayInfo CreateDisplayInfo(int64 id, const gfx::Rect& bounds) { |
| 42 DisplayInfo info(id, "dummy", false); | 42 DisplayInfo info(id, "dummy", false); |
| 43 info.SetBounds(bounds); | 43 info.SetBounds(bounds); |
| 44 return info; | 44 return info; |
| 45 } | 45 } |
| 46 | 46 |
| 47 void EnableMaximizeMode(bool enable) { | 47 void EnableMaximizeMode(bool enable) { |
| 48 Shell::GetInstance() | 48 Shell::GetInstance() |
| 49 ->maximize_mode_controller() | 49 ->maximize_mode_controller() |
| (...skipping 598 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 648 .GetActiveRotation()); | 648 .GetActiveRotation()); |
| 649 | 649 |
| 650 delegate()->SetDisplayRotation(kNewRotation, | 650 delegate()->SetDisplayRotation(kNewRotation, |
| 651 gfx::Display::ROTATION_SOURCE_ACTIVE); | 651 gfx::Display::ROTATION_SOURCE_ACTIVE); |
| 652 | 652 |
| 653 EXPECT_EQ(kNewRotation, display_manager->GetDisplayInfo(kInternalDisplayId) | 653 EXPECT_EQ(kNewRotation, display_manager->GetDisplayInfo(kInternalDisplayId) |
| 654 .GetActiveRotation()); | 654 .GetActiveRotation()); |
| 655 } | 655 } |
| 656 | 656 |
| 657 } // namespace ash | 657 } // namespace ash |
| OLD | NEW |