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

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

Issue 2922643002: Update the button visibility when mouse enters or exits from notification surface window (Closed)
Patch Set: early return Created 3 years, 6 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_notification_content_view.h" 5 #include "ui/arc/notification/arc_notification_content_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_ENTERED ||
88 located_event->type() == ui::ET_MOUSE_EXITED) {
89 owner_->UpdateControlButtonsVisibility();
90 return;
91 }
92
87 if (located_event->type() == ui::ET_MOUSE_MOVED || 93 if (located_event->type() == ui::ET_MOUSE_MOVED ||
88 located_event->IsMouseWheelEvent()) { 94 located_event->IsMouseWheelEvent()) {
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 }
(...skipping 611 matching lines...) Expand 10 before | Expand all | Expand 10 after
708 settings_button_->SchedulePaint(); 714 settings_button_->SchedulePaint();
709 } 715 }
710 if (close_button_) { 716 if (close_button_) {
711 close_button_->SetBackground(views::CreateSolidBackground(current_color)); 717 close_button_->SetBackground(views::CreateSolidBackground(current_color));
712 close_button_->SchedulePaint(); 718 close_button_->SchedulePaint();
713 } 719 }
714 } 720 }
715 } 721 }
716 722
717 } // namespace arc 723 } // 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