summaryrefslogtreecommitdiffstats
path: root/ash
diff options
context:
space:
mode:
authorvarkha@chromium.org <varkha@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-01-06 22:01:58 +0000
committervarkha@chromium.org <varkha@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-01-06 22:01:58 +0000
commit736282c7fa647f483e2f34181c6e74c7f802ee70 (patch)
tree157e6863d2e5a8d5d8bf3cb7a102ae4199a1c401 /ash
parent3b66a3cddaa01576269a60803b0d9313d21a78f4 (diff)
downloadchromium_src-736282c7fa647f483e2f34181c6e74c7f802ee70.zip
chromium_src-736282c7fa647f483e2f34181c6e74c7f802ee70.tar.gz
chromium_src-736282c7fa647f483e2f34181c6e74c7f802ee70.tar.bz2
Re-enables docked windows by default in M34 (reverts issue 109663002)
BUG=None TEST=Visual 1. in chrome://flags verify that ash-disable-docked-windows is present. 2. in chrome://flags verify that ash-enable-docked-windows is absent. 3. When running chrome without ash-enable-docked-windows it should be possible to dock a window at a screen edge. TEST=ash_unittests --gtest_filter=*Dock* Review URL: https://codereview.chromium.org/123743003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@243178 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ash')
-rw-r--r--ash/ash_switches.cc34
-rw-r--r--ash/ash_switches.h9
-rw-r--r--ash/wm/dock/docked_window_layout_manager_unittest.cc2
-rw-r--r--ash/wm/dock/docked_window_resizer_unittest.cc2
-rw-r--r--ash/wm/system_gesture_event_filter_unittest.cc4
-rw-r--r--ash/wm/workspace_controller_unittest.cc4
6 files changed, 24 insertions, 31 deletions
diff --git a/ash/ash_switches.cc b/ash/ash_switches.cc
index 1234a2c..6f369b6 100644
--- a/ash/ash_switches.cc
+++ b/ash/ash_switches.cc
@@ -66,6 +66,19 @@ const char kAshDisableAutoMaximizing[] = "ash-disable-auto-maximizing";
const char kAshDisableDisplayChangeLimiter[] =
"ash-disable-display-change-limiter";
+// Disable ability to dock windows at the desktop edge.
+const char kAshDisableDockedWindows[] = "ash-disable-docked-windows";
+
+// Disallow items to be dragged from the app launcher list into the launcher.
+const char kAshDisableDragAndDropAppListToLauncher[] =
+ "ash-disable-drag-and-drop-applist-to-launcher";
+
+// Disable dragging items off the shelf to unpin them.
+const char kAshDisableDragOffShelf[] = "ash-disable-drag-off-shelf";
+
+// Disables overview mode for window switching.
+const char kAshDisableOverviewMode[] = "ash-disable-overview-mode";
+
#if defined(OS_CHROMEOS)
// Disable the notification when a low-power USB charger is connected.
const char kAshDisableUsbChargerNotification[] =
@@ -91,12 +104,6 @@ const char kAshEnableAlternateFrameCaptionButtonStyle[] =
// main monitor as internal.
const char kAshEnableBrightnessControl[] = "ash-enable-brightness-control";
-// Enable ability to dock windows at the desktop edge.
-const char kAshEnableDockedWindows[] = "ash-enable-docked-windows";
-
-// Disable dragging items off the shelf to unpin them.
-const char kAshDisableDragOffShelf[] = "ash-disable-drag-off-shelf";
-
// Enables putting all windows into immersive fullscreen via <F4>.
const char kAshEnableImmersiveFullscreenForAllWindows[] =
"ash-enable-immersive-all-windows";
@@ -120,9 +127,6 @@ const char kAshEnableMultiUserTray[] = "ash-enable-multi-user-tray";
// Enables the Oak tree viewer.
const char kAshEnableOak[] = "ash-enable-oak";
-// Disables overview mode for window switching.
-const char kAshDisableOverviewMode[] = "ash-disable-overview-mode";
-
// Enables software based mirroring.
const char kAshEnableSoftwareMirroring[] = "ash-enable-software-mirroring";
@@ -177,10 +181,6 @@ const char kAshTouchHud[] = "ash-touch-hud";
// crbug's [244983, 244990, 244994, 245005, 245012]
const char kAshUseAlternateShelfLayout[] = "ash-use-alternate-shelf";
-// Flags explicitly show or hide the shelf alignment menu.
-const char kShowShelfAlignmentMenu[] = "show-launcher-alignment-menu";
-const char kHideShelfAlignmentMenu[] = "hide-launcher-alignment-menu";
-
// Uses the 1st display in --ash-host-window-bounds as internal display.
// This is for debugging on linux desktop.
const char kAshUseFirstDisplayAsInternal[] =
@@ -199,9 +199,9 @@ const char kForceAshToDesktop[] = "ash-force-desktop";
#endif
-// Disallow items to be dragged from the app launcher list into the launcher.
-const char kAshDisableDragAndDropAppListToLauncher[] =
- "ash-disable-drag-and-drop-applist-to-launcher";
+// Flags explicitly show or hide the shelf alignment menu.
+const char kShowShelfAlignmentMenu[] = "show-launcher-alignment-menu";
+const char kHideShelfAlignmentMenu[] = "hide-launcher-alignment-menu";
bool UseAlternateFrameCaptionButtonStyle() {
// For the sake of simplicity, the alternate caption button style is only
@@ -251,7 +251,7 @@ bool UseOverviewMode() {
}
bool UseDockedWindows() {
- return CommandLine::ForCurrentProcess()->HasSwitch(kAshEnableDockedWindows);
+ return !CommandLine::ForCurrentProcess()->HasSwitch(kAshDisableDockedWindows);
}
#if defined(OS_CHROMEOS)
diff --git a/ash/ash_switches.h b/ash/ash_switches.h
index eb1c542..161d72c 100644
--- a/ash/ash_switches.h
+++ b/ash/ash_switches.h
@@ -25,16 +25,17 @@ ASH_EXPORT extern const char kAshDebugShowPreferredNetworks[];
ASH_EXPORT extern const char kAshDefaultWallpaperIsOem[];
ASH_EXPORT extern const char kAshDefaultWallpaperLarge[];
ASH_EXPORT extern const char kAshDefaultWallpaperSmall[];
+ASH_EXPORT extern const char kAshDisableAlternateFrameCaptionButtonStyle[];
ASH_EXPORT extern const char kAshDisableAlternateShelfLayout[];
#if defined(OS_CHROMEOS)
ASH_EXPORT extern const char kAshDisableAudioDeviceMenu[];
#endif
-ASH_EXPORT extern const char kAshDisableAlternateFrameCaptionButtonStyle[];
ASH_EXPORT extern const char kAshDisableAutoMaximizing[];
ASH_EXPORT extern const char kAshDisableDisplayChangeLimiter[];
+ASH_EXPORT extern const char kAshDisableDockedWindows[];
+ASH_EXPORT extern const char kAshDisableDragAndDropAppListToLauncher[];
ASH_EXPORT extern const char kAshDisableDragOffShelf[];
ASH_EXPORT extern const char kAshDisableOverviewMode[];
-ASH_EXPORT extern const char kAshDisableDragAndDropAppListToLauncher[];
#if defined(OS_CHROMEOS)
ASH_EXPORT extern const char kAshDisableUsbChargerNotification[];
ASH_EXPORT extern const char kAshEnableAudioDeviceMenu[];
@@ -42,7 +43,6 @@ ASH_EXPORT extern const char kAshEnableAudioDeviceMenu[];
ASH_EXPORT extern const char kAshEnableAdvancedGestures[];
ASH_EXPORT extern const char kAshEnableAlternateFrameCaptionButtonStyle[];
ASH_EXPORT extern const char kAshEnableBrightnessControl[];
-ASH_EXPORT extern const char kAshEnableDockedWindows[];
ASH_EXPORT extern const char kAshEnableImmersiveFullscreenForAllWindows[];
#if defined(OS_CHROMEOS)
ASH_EXPORT extern const char kAshEnableFullMultiProfileMode[];
@@ -101,9 +101,6 @@ ASH_EXPORT bool UseOverviewMode();
ASH_EXPORT bool UseDockedWindows();
#if defined(OS_CHROMEOS)
-// Returns true if new audio handler should be used.
-ASH_EXPORT bool UseNewAudioHandler();
-
// Returns true if we should show the audio device switching UI.
ASH_EXPORT bool ShowAudioDeviceMenu();
diff --git a/ash/wm/dock/docked_window_layout_manager_unittest.cc b/ash/wm/dock/docked_window_layout_manager_unittest.cc
index 7d63296..17a155d 100644
--- a/ash/wm/dock/docked_window_layout_manager_unittest.cc
+++ b/ash/wm/dock/docked_window_layout_manager_unittest.cc
@@ -46,8 +46,6 @@ class DockedWindowLayoutManagerTest
virtual ~DockedWindowLayoutManagerTest() {}
virtual void SetUp() OVERRIDE {
- CommandLine::ForCurrentProcess()->AppendSwitch(
- ash::switches::kAshEnableDockedWindows);
AshTestBase::SetUp();
UpdateDisplay("600x600");
ASSERT_TRUE(test::TestShelfDelegate::instance());
diff --git a/ash/wm/dock/docked_window_resizer_unittest.cc b/ash/wm/dock/docked_window_resizer_unittest.cc
index ac0b5b7..b15117d 100644
--- a/ash/wm/dock/docked_window_resizer_unittest.cc
+++ b/ash/wm/dock/docked_window_resizer_unittest.cc
@@ -45,8 +45,6 @@ class DockedWindowResizerTest
virtual ~DockedWindowResizerTest() {}
virtual void SetUp() OVERRIDE {
- CommandLine::ForCurrentProcess()->AppendSwitch(
- ash::switches::kAshEnableDockedWindows);
AshTestBase::SetUp();
UpdateDisplay("600x400");
test::ShellTestApi test_api(Shell::GetInstance());
diff --git a/ash/wm/system_gesture_event_filter_unittest.cc b/ash/wm/system_gesture_event_filter_unittest.cc
index a07953c..8335b22 100644
--- a/ash/wm/system_gesture_event_filter_unittest.cc
+++ b/ash/wm/system_gesture_event_filter_unittest.cc
@@ -203,9 +203,9 @@ class SystemGestureEventFilterTest
virtual void SetUp() OVERRIDE {
CommandLine::ForCurrentProcess()->AppendSwitch(
ash::switches::kAshEnableAdvancedGestures);
- if (docked_enabled_) {
+ if (!docked_enabled_) {
CommandLine::ForCurrentProcess()->AppendSwitch(
- ash::switches::kAshEnableDockedWindows);
+ ash::switches::kAshDisableDockedWindows);
}
test::AshTestBase::SetUp();
// Enable brightness key.
diff --git a/ash/wm/workspace_controller_unittest.cc b/ash/wm/workspace_controller_unittest.cc
index 54cf58c..f1aa39e 100644
--- a/ash/wm/workspace_controller_unittest.cc
+++ b/ash/wm/workspace_controller_unittest.cc
@@ -1253,9 +1253,9 @@ class WorkspaceControllerTestDragging
// testing::Test:
virtual void SetUp() OVERRIDE {
WorkspaceControllerTest::SetUp();
- if (docked_windows_enabled()) {
+ if (!docked_windows_enabled()) {
CommandLine::ForCurrentProcess()->AppendSwitch(
- ash::switches::kAshEnableDockedWindows);
+ ash::switches::kAshDisableDockedWindows);
}
}