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

Unified Diff: ash/shelf/shelf_layout_manager.cc

Issue 879653002: Remove --ash-enable-tray-dragging flag (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 11 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/shelf/shelf_layout_manager.h ('k') | ash/shelf/shelf_layout_manager_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/shelf/shelf_layout_manager.cc
diff --git a/ash/shelf/shelf_layout_manager.cc b/ash/shelf/shelf_layout_manager.cc
index b096b8f396c7bfe9d390a0d455e202a0a9954d66..c74103a42bc508d545d41c80cd0c305a5610ce10 100644
--- a/ash/shelf/shelf_layout_manager.cc
+++ b/ash/shelf/shelf_layout_manager.cc
@@ -77,12 +77,6 @@ ui::Layer* GetLayer(views::Widget* widget) {
return widget->GetNativeView()->layer();
}
-bool IsDraggingTrayEnabled() {
- static bool dragging_tray_allowed = base::CommandLine::ForCurrentProcess()->
- HasSwitch(ash::switches::kAshEnableTrayDragging);
- return dragging_tray_allowed;
-}
-
} // namespace
// static
@@ -413,29 +407,12 @@ void ShelfLayoutManager::StartGestureDrag(const ui::GestureEvent& gesture) {
UpdateShelfBackground(BACKGROUND_CHANGE_ANIMATE);
}
-ShelfLayoutManager::DragState ShelfLayoutManager::UpdateGestureDrag(
+void ShelfLayoutManager::UpdateGestureDrag(
const ui::GestureEvent& gesture) {
bool horizontal = IsHorizontalAlignment();
gesture_drag_amount_ += horizontal ? gesture.details().scroll_y() :
gesture.details().scroll_x();
LayoutShelf();
-
- // Start reveling the status menu when:
- // - dragging up on an already visible shelf
- // - dragging up on a hidden shelf, but it is currently completely visible.
- if (horizontal && gesture.details().scroll_y() < 0) {
- int min_height = 0;
- if (gesture_drag_auto_hide_state_ == SHELF_AUTO_HIDE_HIDDEN && shelf_)
- min_height = shelf_->GetContentsView()->GetPreferredSize().height();
-
- if (min_height < shelf_->GetWindowBoundsInScreen().height() &&
- gesture.root_location().x() >=
- shelf_->status_area_widget()->GetWindowBoundsInScreen().x() &&
- IsDraggingTrayEnabled())
- return DRAG_TRAY;
- }
-
- return DRAG_SHELF;
}
void ShelfLayoutManager::CompleteGestureDrag(const ui::GestureEvent& gesture) {
« no previous file with comments | « ash/shelf/shelf_layout_manager.h ('k') | ash/shelf/shelf_layout_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698