Commit f5984fd6 authored by Megumi Hattori's avatar Megumi Hattori Committed by Commit Bot

Trigger inline settings on notifications by long tap.

The inline settings should be triggered by long tap.

BUG=818734
TEST=manual

Change-Id: Ieeb7a0c009b15157bd90c823ece84ed39bf676eb
Reviewed-on: https://chromium-review.googlesource.com/950504Reviewed-by: default avatarTetsui Ohkubo <tetsui@chromium.org>
Reviewed-by: default avatarYoshiki Iguchi <yoshiki@chromium.org>
Commit-Queue: Megumi Hattori <megumihattori@google.com>
Cr-Commit-Position: refs/heads/master@{#541730}
parent ddb9d387
......@@ -776,6 +776,14 @@ void NotificationViewMD::OnMouseEvent(ui::MouseEvent* event) {
View::OnMouseEvent(event);
}
void NotificationViewMD::OnGestureEvent(ui::GestureEvent* event) {
if (event->type() == ui::ET_GESTURE_LONG_TAP) {
ToggleInlineSettings(*event->AsLocatedEvent());
return;
}
MessageView::OnGestureEvent(event);
}
void NotificationViewMD::UpdateWithNotification(
const Notification& notification) {
MessageView::UpdateWithNotification(notification);
......@@ -1353,7 +1361,7 @@ void NotificationViewMD::Activate() {
void NotificationViewMD::AddBackgroundAnimation(const ui::LocatedEvent& event) {
header_row_->SetSubpixelRenderingEnabled(false);
SetInkDropMode(InkDropMode::ON);
SetInkDropMode(InkDropMode::ON_NO_GESTURE_HANDLER);
// Convert the point of |event| from the coordinate system of
// |control_buttons_view_| to that of NotificationViewMD, create a new
......
......@@ -234,6 +234,7 @@ class MESSAGE_CENTER_EXPORT NotificationViewMD
gfx::NativeCursor GetCursor(const ui::MouseEvent& event) override;
bool OnMousePressed(const ui::MouseEvent& event) override;
void OnMouseEvent(ui::MouseEvent* event) override;
void OnGestureEvent(ui::GestureEvent* event) override;
// Overridden from views::InkDropHostView:
void AddInkDropLayer(ui::Layer* ink_drop_layer) override;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment