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

Unified Diff: ash/display/display_controller.cc

Issue 10827184: Disabling extended desktop (by default). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebased. Created 8 years, 4 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 | « ash/display/display_controller.h ('k') | ash/display/display_controller_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/display/display_controller.cc
diff --git a/ash/display/display_controller.cc b/ash/display/display_controller.cc
index 456b831235a36e971c5e3bb6e08f7ee21f7567a8..c50c4b9a6d0af5313c0fba2af6b5fd241bfd4bcb 100644
--- a/ash/display/display_controller.cc
+++ b/ash/display/display_controller.cc
@@ -22,6 +22,10 @@
namespace ash {
namespace internal {
+namespace {
+// True if the extended desktop mode is enabled.
+bool extended_desktop_enabled = false;
+} // namespace
DisplayController::DisplayController()
: secondary_display_layout_(RIGHT),
@@ -207,10 +211,14 @@ void DisplayController::OnDisplayRemoved(const gfx::Display& display) {
// static
bool DisplayController::IsExtendedDesktopEnabled(){
- static bool extended_desktop_disabled =
+ return extended_desktop_enabled ||
CommandLine::ForCurrentProcess()->HasSwitch(
- switches::kAshExtendedDesktopDisabled);
- return !extended_desktop_disabled;
+ switches::kAshExtendedDesktop);
+}
+
+// static
+void DisplayController::SetExtendedDesktopEnabled(bool enabled) {
+ extended_desktop_enabled = enabled;
}
aura::RootWindow* DisplayController::AddRootWindowForDisplay(
« no previous file with comments | « ash/display/display_controller.h ('k') | ash/display/display_controller_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698