| OLD | NEW |
| 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 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 78 // 1. Touches, because View should no longer receive touch events. | 78 // 1. Touches, because View should no longer receive touch events. |
| 79 // See View::OnTouchEvent. | 79 // See View::OnTouchEvent. |
| 80 // 2. Tap gestures are handled on the Android side, so ignore them. | 80 // 2. Tap gestures are handled on the Android side, so ignore them. |
| 81 // See crbug.com/709911. | 81 // See crbug.com/709911. |
| 82 // 3. Key events. These are already forwarded by NotificationSurface's | 82 // 3. Key events. These are already forwarded by NotificationSurface's |
| 83 // WindowDelegate. | 83 // WindowDelegate. |
| 84 if (event->IsLocatedEvent()) { | 84 if (event->IsLocatedEvent()) { |
| 85 ui::LocatedEvent* located_event = event->AsLocatedEvent(); | 85 ui::LocatedEvent* located_event = event->AsLocatedEvent(); |
| 86 located_event->target()->ConvertEventToTarget(widget->GetNativeWindow(), | 86 located_event->target()->ConvertEventToTarget(widget->GetNativeWindow(), |
| 87 located_event); | 87 located_event); |
| 88 if (located_event->type() == ui::ET_MOUSE_ENTERED || |
| 89 located_event->type() == ui::ET_MOUSE_EXITED) { |
| 90 owner_->UpdateControlButtonsVisibility(); |
| 91 return; |
| 92 } |
| 93 |
| 88 if (located_event->type() == ui::ET_MOUSE_MOVED) { | 94 if (located_event->type() == ui::ET_MOUSE_MOVED) { |
| 89 widget->OnMouseEvent(located_event->AsMouseEvent()); | 95 widget->OnMouseEvent(located_event->AsMouseEvent()); |
| 90 } else if (located_event->IsScrollEvent()) { | 96 } else if (located_event->IsScrollEvent()) { |
| 91 widget->OnScrollEvent(located_event->AsScrollEvent()); | 97 widget->OnScrollEvent(located_event->AsScrollEvent()); |
| 92 } else if (located_event->IsGestureEvent() && | 98 } else if (located_event->IsGestureEvent() && |
| 93 event->type() != ui::ET_GESTURE_TAP) { | 99 event->type() != ui::ET_GESTURE_TAP) { |
| 94 widget->OnGestureEvent(located_event->AsGestureEvent()); | 100 widget->OnGestureEvent(located_event->AsGestureEvent()); |
| 95 } | 101 } |
| 96 } | 102 } |
| 97 } | 103 } |
| (...skipping 625 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 723 } | 729 } |
| 724 if (close_button_) { | 730 if (close_button_) { |
| 725 close_button_->set_background( | 731 close_button_->set_background( |
| 726 views::Background::CreateSolidBackground(current_color)); | 732 views::Background::CreateSolidBackground(current_color)); |
| 727 close_button_->SchedulePaint(); | 733 close_button_->SchedulePaint(); |
| 728 } | 734 } |
| 729 } | 735 } |
| 730 } | 736 } |
| 731 | 737 |
| 732 } // namespace arc | 738 } // namespace arc |
| OLD | NEW |