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

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

Issue 2668583005: Not Remove Non-Closable Arc Popup When Close Button is Pressed (Closed)
Patch Set: Created 3 years, 11 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 cdb2c7da5a0f59fe3ac3440d5c51865e94e37ee3..617f920fe0d62cd97f0ea90696c4541f682d2b15 100644
--- a/ui/arc/notification/arc_custom_notification_view.cc
+++ b/ui/arc/notification/arc_custom_notification_view.cc
@@ -222,8 +222,10 @@ class ArcCustomNotificationView::CloseButton : public views::ImageButton {
};
ArcCustomNotificationView::ArcCustomNotificationView(
- ArcCustomNotificationItem* item)
+ ArcCustomNotificationItem* item,
+ message_center::MessageView* parent)
: item_(item),
+ parent_(parent),
notification_key_(item->notification_key()),
event_forwarder_(new EventForwarder(this)) {
SetFocusBehavior(FocusBehavior::ALWAYS);
@@ -504,7 +506,7 @@ views::FocusTraversable* ArcCustomNotificationView::GetFocusTraversable() {
void ArcCustomNotificationView::ButtonPressed(views::Button* sender,
const ui::Event& event) {
if (item_ && !item_->pinned() && sender == floating_close_button_) {
- item_->CloseFromCloseButton();
+ parent_->OnCloseButtonPressed();
dewittj 2017/02/07 00:03:11 any reason you didn't just use views::View::parent
yoshiki 2017/02/22 08:55:23 Thanks. I changed the code with using parent(). PT
}
}

Powered by Google App Engine
This is Rietveld 408576698