| 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 "chrome/browser/chromeos/display/display_preferences.h" | 5 #include "chrome/browser/chromeos/display/display_preferences.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "ash/content/display/screen_orientation_controller_chromeos.h" | 10 #include "ash/content/display/screen_orientation_controller_chromeos.h" |
| (...skipping 25 matching lines...) Expand all Loading... |
| 36 using ash::ResolutionNotificationController; | 36 using ash::ResolutionNotificationController; |
| 37 | 37 |
| 38 namespace chromeos { | 38 namespace chromeos { |
| 39 namespace { | 39 namespace { |
| 40 const char kPrimaryIdKey[] = "primary-id"; | 40 const char kPrimaryIdKey[] = "primary-id"; |
| 41 const char kMirroredKey[] = "mirrored"; | 41 const char kMirroredKey[] = "mirrored"; |
| 42 const char kPositionKey[] = "position"; | 42 const char kPositionKey[] = "position"; |
| 43 const char kOffsetKey[] = "offset"; | 43 const char kOffsetKey[] = "offset"; |
| 44 | 44 |
| 45 // The mean acceleration due to gravity on Earth in m/s^2. | 45 // The mean acceleration due to gravity on Earth in m/s^2. |
| 46 const float kMeanGravity = 9.80665f; | 46 const float kMeanGravity = -9.80665f; |
| 47 | 47 |
| 48 bool IsRotationLocked() { | 48 bool IsRotationLocked() { |
| 49 return ash::Shell::GetInstance() | 49 return ash::Shell::GetInstance() |
| 50 ->screen_orientation_controller() | 50 ->screen_orientation_controller() |
| 51 ->rotation_locked(); | 51 ->rotation_locked(); |
| 52 } | 52 } |
| 53 | 53 |
| 54 std::string ToPairString(const ash::DisplayIdPair& pair) { | 54 std::string ToPairString(const ash::DisplayIdPair& pair) { |
| 55 return base::Int64ToString(pair.first) + "," + | 55 return base::Int64ToString(pair.first) + "," + |
| 56 base::Int64ToString(pair.second); | 56 base::Int64ToString(pair.second); |
| (...skipping 916 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 973 // Sanity check. Restore to extended. | 973 // Sanity check. Restore to extended. |
| 974 StoreDisplayBoolPropertyForPair(pair, "default_unified", false); | 974 StoreDisplayBoolPropertyForPair(pair, "default_unified", false); |
| 975 StoreDisplayBoolPropertyForPair(pair, "mirrored", false); | 975 StoreDisplayBoolPropertyForPair(pair, "mirrored", false); |
| 976 LoadDisplayPreferences(false); | 976 LoadDisplayPreferences(false); |
| 977 UpdateDisplay("100x100,200x200"); | 977 UpdateDisplay("100x100,200x200"); |
| 978 EXPECT_FALSE(display_manager->IsInMirrorMode()); | 978 EXPECT_FALSE(display_manager->IsInMirrorMode()); |
| 979 EXPECT_FALSE(display_manager->IsInUnifiedMode()); | 979 EXPECT_FALSE(display_manager->IsInUnifiedMode()); |
| 980 } | 980 } |
| 981 | 981 |
| 982 } // namespace chromeos | 982 } // namespace chromeos |
| OLD | NEW |