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

Unified Diff: ui/arc/notification/arc_custom_notification_view.cc

Issue 2751353002: Not Remove Non-Closable Arc Popup When Close Button is Pressed (Closed)
Patch Set: Created 3 years, 9 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
Index: ui/arc/notification/arc_custom_notification_view.cc
diff --git a/ui/arc/notification/arc_custom_notification_view.cc b/ui/arc/notification/arc_custom_notification_view.cc
index d44009340e761e2c9703c2e89d52f45b0ca7b87c..a494efba28e6dfa1d236fda160d408f1f633a02c 100644
--- a/ui/arc/notification/arc_custom_notification_view.cc
+++ b/ui/arc/notification/arc_custom_notification_view.cc
@@ -503,12 +503,18 @@ void ArcCustomNotificationView::OnMouseExited(const ui::MouseEvent&) {
}
void ArcCustomNotificationView::OnFocus() {
+ CHECK_EQ(message_center::CustomNotificationView::kViewClassName,
+ parent()->GetClassName());
+
NativeViewHost::OnFocus();
static_cast<message_center::CustomNotificationView*>(parent())
->OnContentFocused();
}
void ArcCustomNotificationView::OnBlur() {
+ CHECK_EQ(message_center::CustomNotificationView::kViewClassName,
+ parent()->GetClassName());
+
NativeViewHost::OnBlur();
static_cast<message_center::CustomNotificationView*>(parent())
->OnContentBlured();
@@ -532,7 +538,10 @@ views::FocusTraversable* ArcCustomNotificationView::GetFocusTraversable() {
void ArcCustomNotificationView::ButtonPressed(views::Button* sender,
const ui::Event& event) {
if (item_ && !item_->pinned() && sender == close_button_) {
- item_->CloseFromCloseButton();
+ CHECK_EQ(message_center::CustomNotificationView::kViewClassName,
+ parent()->GetClassName());
+ static_cast<message_center::CustomNotificationView*>(parent())
+ ->OnCloseButtonPressed();
}
if (item_ && settings_button_ && sender == settings_button_) {
settings_button_->HideInkDrop();
« no previous file with comments | « ui/arc/notification/arc_custom_notification_item.cc ('k') | ui/message_center/views/custom_notification_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698