Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(6588)

Unified Diff: chrome/browser/ui/webui/options/chromeos/display_options_handler.cc

Issue 1261693004: Allow dynamic enabling/disabling of unified desktop (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/chromeos/display/display_preferences_unittest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/webui/options/chromeos/display_options_handler.cc
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 4859235d89da8c531e1ef321fdc056039c9819b7..4fc8e39ea1db370477e6b2d7be22c5a893aeabed 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();
}
« no previous file with comments | « chrome/browser/chromeos/display/display_preferences_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698