summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ash/ash_switches.cc8
-rw-r--r--ash/ash_switches.h2
-rw-r--r--ash/launcher/launcher_view_unittest.cc4
-rw-r--r--chrome/app/generated_resources.grd2
-rw-r--r--chrome/browser/about_flags.cc4
-rw-r--r--chrome/browser/ui/ash/launcher/chrome_launcher_controller_browsertest.cc3
6 files changed, 10 insertions, 13 deletions
diff --git a/ash/ash_switches.cc b/ash/ash_switches.cc
index 7f5f1d6..33d3672 100644
--- a/ash/ash_switches.cc
+++ b/ash/ash_switches.cc
@@ -90,8 +90,8 @@ const char kAshEnableBrightnessControl[] = "ash-enable-brightness-control";
// Enable the dock area on a desktop.
const char kAshEnableDockedWindows[] = "ash-enable-docked-windows";
-// Enable dragging items off the shelf to unpin them.
-const char kAshEnableDragOffShelf[] = "ash-enable-drag-off-shelf";
+// Disable dragging items off the shelf to unpin them.
+const char kAshDisableDragOffShelf[] = "ash-disable-drag-off-shelf";
// Enable immersive fullscreen mode, regardless of default setting.
const char kAshEnableImmersiveFullscreen[] = "ash-enable-immersive-fullscreen";
@@ -185,8 +185,8 @@ bool UseAlternateShelfLayout() {
}
bool UseDragOffShelf() {
- return CommandLine::ForCurrentProcess()->
- HasSwitch(ash::switches::kAshEnableDragOffShelf);
+ return !CommandLine::ForCurrentProcess()->
+ HasSwitch(ash::switches::kAshDisableDragOffShelf);
}
bool ShowShelfAlignmentMenu() {
diff --git a/ash/ash_switches.h b/ash/ash_switches.h
index bbe8784..73f2303 100644
--- a/ash/ash_switches.h
+++ b/ash/ash_switches.h
@@ -31,6 +31,7 @@ ASH_EXPORT extern const char kAshDisableAudioDeviceMenu[];
#endif
ASH_EXPORT extern const char kAshDisableAutoMaximizing[];
ASH_EXPORT extern const char kAshDisableDisplayChangeLimiter[];
+ASH_EXPORT extern const char kAshDisableDragOffShelf[];
ASH_EXPORT extern const char kAshDisableImmersiveFullscreen[];
ASH_EXPORT extern const char kAshDisableNewLockAnimations[];
ASH_EXPORT extern const char kAshDisableOverviewMode[];
@@ -43,7 +44,6 @@ ASH_EXPORT extern const char kAshEnableAudioDeviceMenu[];
ASH_EXPORT extern const char kAshEnableAdvancedGestures[];
ASH_EXPORT extern const char kAshEnableBrightnessControl[];
ASH_EXPORT extern const char kAshEnableDockedWindows[];
-ASH_EXPORT extern const char kAshEnableDragOffShelf[];
#if defined(OS_LINUX)
ASH_EXPORT extern const char kAshEnableMemoryMonitor[];
#endif
diff --git a/ash/launcher/launcher_view_unittest.cc b/ash/launcher/launcher_view_unittest.cc
index 6c43404..cb4dc9a 100644
--- a/ash/launcher/launcher_view_unittest.cc
+++ b/ash/launcher/launcher_view_unittest.cc
@@ -324,7 +324,7 @@ class LauncherViewTest : public AshTestBase {
views::View* button = test_api_->GetButton(button_index);
ui::MouseEvent click_event(ui::ET_MOUSE_PRESSED,
button->bounds().origin(),
- button->bounds().origin(), 0);
+ button->GetBoundsInScreen().origin(), 0);
button_host->PointerPressedOnButton(button, pointer, click_event);
return button;
}
@@ -349,7 +349,7 @@ class LauncherViewTest : public AshTestBase {
views::View* destination = test_api_->GetButton(destination_index);
ui::MouseEvent drag_event(ui::ET_MOUSE_DRAGGED,
destination->bounds().origin(),
- destination->bounds().origin(), 0);
+ destination->GetBoundsInScreen().origin(), 0);
button_host->PointerDraggedOnButton(button, pointer, drag_event);
return button;
}
diff --git a/chrome/app/generated_resources.grd b/chrome/app/generated_resources.grd
index acb1aae..88d0374 100644
--- a/chrome/app/generated_resources.grd
+++ b/chrome/app/generated_resources.grd
@@ -5362,7 +5362,7 @@ Keep your key file in a safe place. You will need it to create new versions of y
Dragging off items from shelf to unpin
</message>
<message name="IDS_FLAGS_DRAG_OFF_SHELF_DESCRIPTION">
- Enable to allow items to be dragged off the shelf to unpin them.
+ Disable to disallow items to be dragged off the shelf to unpin them.
</message>
<message name="IDS_FLAGS_RELAUNCH_BUTTON" desc="Text on a button that restarts Chrome OS when clicked. ">
Restart Now
diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc
index 341f798..203eec2 100644
--- a/chrome/browser/about_flags.cc
+++ b/chrome/browser/about_flags.cc
@@ -926,11 +926,11 @@ const Experiment kExperiments[] = {
SINGLE_VALUE_TYPE(ash::switches::kAshUseAlternateShelfLayout)
},
{
- "ash-enable-drag-off-shelf",
+ "ash-disable-drag-off-shelf",
IDS_FLAGS_DRAG_OFF_SHELF_NAME,
IDS_FLAGS_DRAG_OFF_SHELF_DESCRIPTION,
kOsCrOS,
- SINGLE_VALUE_TYPE(ash::switches::kAshEnableDragOffShelf)
+ SINGLE_VALUE_TYPE(ash::switches::kAshDisableDragOffShelf)
},
{
"enable-background-loader",
diff --git a/chrome/browser/ui/ash/launcher/chrome_launcher_controller_browsertest.cc b/chrome/browser/ui/ash/launcher/chrome_launcher_controller_browsertest.cc
index 54df0b1..01e6b8b 100644
--- a/chrome/browser/ui/ash/launcher/chrome_launcher_controller_browsertest.cc
+++ b/chrome/browser/ui/ash/launcher/chrome_launcher_controller_browsertest.cc
@@ -1592,9 +1592,6 @@ IN_PROC_BROWSER_TEST_F(LauncherAppBrowserTest, DragAndDrop) {
// Do tests for removal of items from the shelf by dragging.
IN_PROC_BROWSER_TEST_F(LauncherAppBrowserTest, DragOffShelf) {
- // Set the command line option to enable the new functionality.
- CommandLine::ForCurrentProcess()->AppendSwitch(
- ash::switches::kAshEnableDragOffShelf);
aura::test::EventGenerator generator(
ash::Shell::GetPrimaryRootWindow(), gfx::Point());
ash::test::LauncherViewTestAPI test(launcher_->GetLauncherViewForTest());