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

Unified Diff: ash/shelf/shelf_button.cc

Issue 2876203003: Make shelf item can be dragged when context menu is opened.
Patch Set: Fixed comments. Created 3 years, 7 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 | « no previous file | ash/shelf/shelf_view.cc » ('j') | ash/shelf/shelf_view.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/shelf/shelf_button.cc
diff --git a/ash/shelf/shelf_button.cc b/ash/shelf/shelf_button.cc
index f8c930d29ce9c4c65a5441bc013f0b3692b0ba3f..a750deb9a4876e580c3ac015e8ff9d4c114386fc 100644
--- a/ash/shelf/shelf_button.cc
+++ b/ash/shelf/shelf_button.cc
@@ -26,6 +26,9 @@
#include "ui/views/animation/ink_drop_impl.h"
#include "ui/views/animation/square_ink_drop_ripple.h"
#include "ui/views/controls/image_view.h"
+#if defined(OS_CHROMEOS)
xiyuan 2017/05/16 22:46:56 Ash code is chromeos only now. So this is not need
minch1 2017/05/17 16:55:37 Done.
+#include "ui/views/controls/menu/menu_controller.h"
+#endif
namespace {
@@ -461,6 +464,16 @@ void ShelfButton::OnGestureEvent(ui::GestureEvent* event) {
shelf_view_->PointerReleasedOnButton(this, ShelfView::TOUCH, false);
event->SetHandled();
return;
+#if defined(OS_CHROMEOS)
+ case ui::ET_GESTURE_LONG_TAP: {
+ views::MenuController* controller =
+ views::MenuController::GetActiveInstance();
+ if (controller)
+ controller->set_owner_needs_gesture_events(false);
+ event->SetHandled();
+ return;
+ }
+#endif
default:
return CustomButton::OnGestureEvent(event);
}
« no previous file with comments | « no previous file | ash/shelf/shelf_view.cc » ('j') | ash/shelf/shelf_view.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698