diff options
Diffstat (limited to 'chrome')
-rw-r--r-- | chrome/browser/chromeos/display/display_preferences_unittest.cc | 7 | ||||
-rw-r--r-- | chrome/browser/ui/webui/options/chromeos/display_options_handler.cc | 7 |
2 files changed, 7 insertions, 7 deletions
diff --git a/chrome/browser/chromeos/display/display_preferences_unittest.cc b/chrome/browser/chromeos/display/display_preferences_unittest.cc index eb065ad..07c0514 100644 --- a/chrome/browser/chromeos/display/display_preferences_unittest.cc +++ b/chrome/browser/chromeos/display/display_preferences_unittest.cc @@ -876,11 +876,11 @@ TEST_F(DisplayPreferencesTest, RotationLockTriggersStore) { } TEST_F(DisplayPreferencesTest, SaveUnifiedMode) { - ash::test::DisplayManagerTestApi::EnableUnifiedDesktopForTest(); LoggedInAsUser(); ash::DisplayManager* display_manager = ash::Shell::GetInstance()->display_manager(); + display_manager->SetUnifiedDesktopEnabled(true); UpdateDisplay("200x200,100x100"); ash::DisplayIdPair pair = display_manager->GetCurrentDisplayIdPair(); @@ -928,7 +928,8 @@ TEST_F(DisplayPreferencesTest, SaveUnifiedMode) { EXPECT_FALSE(stored_layout.mirrored); // Exit unified mode. - display_manager->SetDefaultMultiDisplayMode(ash::DisplayManager::EXTENDED); + display_manager->SetDefaultMultiDisplayModeForCurrentDisplays( + ash::DisplayManager::EXTENDED); display_manager->ReconfigureDisplays(); ASSERT_TRUE( secondary_displays->GetDictionary(ToPairString(pair), &new_value)); @@ -953,7 +954,7 @@ TEST_F(DisplayPreferencesTest, RestoreUnifiedMode) { EXPECT_FALSE(display_manager->IsInUnifiedMode()); // Restored to unified. - ash::test::DisplayManagerTestApi::EnableUnifiedDesktopForTest(); + display_manager->SetUnifiedDesktopEnabled(true); StoreDisplayBoolPropertyForPair(pair, "default_unified", true); LoadDisplayPreferences(false); UpdateDisplay("100x100,200x200"); diff --git a/chrome/browser/ui/webui/options/chromeos/display_options_handler.cc b/chrome/browser/ui/webui/options/chromeos/display_options_handler.cc index 4859235..4fc8e39 100644 --- a/chrome/browser/ui/webui/options/chromeos/display_options_handler.cc +++ b/chrome/browser/ui/webui/options/chromeos/display_options_handler.cc @@ -6,7 +6,6 @@ #include <string> -#include "ash/ash_switches.h" #include "ash/display/display_configurator_animation.h" #include "ash/display/display_manager.h" #include "ash/display/resolution_notification_controller.h" @@ -331,7 +330,7 @@ void DisplayOptionsHandler::SendDisplayInfo( void DisplayOptionsHandler::UpdateDisplaySettingsEnabled() { bool enabled = GetDisplayManager()->num_connected_displays() <= 2; - bool show_unified_desktop = ash::switches::UnifiedDesktopEnabled(); + bool show_unified_desktop = GetDisplayManager()->unified_desktop_enabled(); web_ui()->CallJavascriptFunction( "options.BrowserOptions.enableDisplaySettings", @@ -488,10 +487,10 @@ void DisplayOptionsHandler::HandleSetColorProfile(const base::ListValue* args) { void DisplayOptionsHandler::HandleSetUnifiedDesktopEnabled( const base::ListValue* args) { - DCHECK(ash::switches::UnifiedDesktopEnabled()); + DCHECK(GetDisplayManager()->unified_desktop_enabled()); bool enable = false; if (args->GetBoolean(0, &enable)) { - GetDisplayManager()->SetDefaultMultiDisplayMode( + GetDisplayManager()->SetDefaultMultiDisplayModeForCurrentDisplays( enable ? DisplayManager::UNIFIED : DisplayManager::EXTENDED); GetDisplayManager()->ReconfigureDisplays(); } |