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

Side by Side Diff: ui/arc/notification/arc_custom_notification_view.cc

Issue 2904933004: [Notifications] Forward mouse wheel events. (Closed)
Patch Set: 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ui/arc/notification/arc_custom_notification_view.h" 5 #include "ui/arc/notification/arc_custom_notification_view.h"
6 6
7 #include "ash/wm/window_util.h" 7 #include "ash/wm/window_util.h"
8 #include "base/auto_reset.h" 8 #include "base/auto_reset.h"
9 #include "base/memory/ptr_util.h" 9 #include "base/memory/ptr_util.h"
10 #include "components/exo/notification_surface.h" 10 #include "components/exo/notification_surface.h"
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 // 1. Touches, because View should no longer receive touch events. 77 // 1. Touches, because View should no longer receive touch events.
78 // See View::OnTouchEvent. 78 // See View::OnTouchEvent.
79 // 2. Tap gestures are handled on the Android side, so ignore them. 79 // 2. Tap gestures are handled on the Android side, so ignore them.
80 // See crbug.com/709911. 80 // See crbug.com/709911.
81 // 3. Key events. These are already forwarded by NotificationSurface's 81 // 3. Key events. These are already forwarded by NotificationSurface's
82 // WindowDelegate. 82 // WindowDelegate.
83 if (event->IsLocatedEvent()) { 83 if (event->IsLocatedEvent()) {
84 ui::LocatedEvent* located_event = event->AsLocatedEvent(); 84 ui::LocatedEvent* located_event = event->AsLocatedEvent();
85 located_event->target()->ConvertEventToTarget(widget->GetNativeWindow(), 85 located_event->target()->ConvertEventToTarget(widget->GetNativeWindow(),
86 located_event); 86 located_event);
87 if (located_event->type() == ui::ET_MOUSE_MOVED) { 87 if (located_event->type() == ui::ET_MOUSE_MOVED ||
88 located_event->IsMouseWheelEvent()) {
88 widget->OnMouseEvent(located_event->AsMouseEvent()); 89 widget->OnMouseEvent(located_event->AsMouseEvent());
89 } else if (located_event->IsScrollEvent()) { 90 } else if (located_event->IsScrollEvent()) {
90 widget->OnScrollEvent(located_event->AsScrollEvent()); 91 widget->OnScrollEvent(located_event->AsScrollEvent());
91 } else if (located_event->IsGestureEvent() && 92 } else if (located_event->IsGestureEvent() &&
92 event->type() != ui::ET_GESTURE_TAP) { 93 event->type() != ui::ET_GESTURE_TAP) {
93 widget->OnGestureEvent(located_event->AsGestureEvent()); 94 widget->OnGestureEvent(located_event->AsGestureEvent());
94 } 95 }
95 } 96 }
96 } 97 }
97 98
(...skipping 614 matching lines...) Expand 10 before | Expand all | Expand 10 after
712 } 713 }
713 if (close_button_) { 714 if (close_button_) {
714 close_button_->set_background( 715 close_button_->set_background(
715 views::Background::CreateSolidBackground(current_color)); 716 views::Background::CreateSolidBackground(current_color));
716 close_button_->SchedulePaint(); 717 close_button_->SchedulePaint();
717 } 718 }
718 } 719 }
719 } 720 }
720 721
721 } // namespace arc 722 } // namespace arc
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698