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

Side by Side Diff: ui/message_center/views/message_view.cc

Issue 2668583005: Not Remove Non-Closable Arc Popup When Close Button is Pressed (Closed)
Patch Set: Created 3 years, 10 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/message_center/views/message_view.h" 5 #include "ui/message_center/views/message_view.h"
6 6
7 #include "base/strings/utf_string_conversions.h" 7 #include "base/strings/utf_string_conversions.h"
8 #include "ui/accessibility/ax_node_data.h" 8 #include "ui/accessibility/ax_node_data.h"
9 #include "ui/base/l10n/l10n_util.h" 9 #include "ui/base/l10n/l10n_util.h"
10 #include "ui/base/models/simple_menu_model.h" 10 #include "ui/base/models/simple_menu_model.h"
(...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after
222 // slide-out behavior. See http://crbug.com/172991 222 // slide-out behavior. See http://crbug.com/172991
223 223
224 if (!event->IsScrollGestureEvent() && !event->IsFlingScrollEvent()) 224 if (!event->IsScrollGestureEvent() && !event->IsFlingScrollEvent())
225 return; 225 return;
226 226
227 if (scroller_) 227 if (scroller_)
228 scroller_->OnGestureEvent(event); 228 scroller_->OnGestureEvent(event);
229 event->SetHandled(); 229 event->SetHandled();
230 } 230 }
231 231
232 void MessageView::OnCloseButtonPressed() {
233 controller_->RemoveNotification(notification_id_, true); // By user.
234 }
235
232 void MessageView::OnSlideOut() { 236 void MessageView::OnSlideOut() {
233 controller_->RemoveNotification(notification_id_, true); // By user. 237 controller_->RemoveNotification(notification_id_, true); // By user.
234 } 238 }
235 239
236 void MessageView::SetDrawBackgroundAsActive(bool active) { 240 void MessageView::SetDrawBackgroundAsActive(bool active) {
237 background_view_->background()-> 241 background_view_->background()->
238 SetNativeControlColor(active ? kHoveredButtonBackgroundColor : 242 SetNativeControlColor(active ? kHoveredButtonBackgroundColor :
239 kNotificationBackgroundColor); 243 kNotificationBackgroundColor);
240 SchedulePaint(); 244 SchedulePaint();
241 } 245 }
242 246
243 } // namespace message_center 247 } // namespace message_center
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698