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

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: Addressed comment 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 unified diff | Download patch
« no previous file with comments | « ui/message_center/views/message_view.h ('k') | ui/message_center/views/notification_view.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 194 matching lines...) Expand 10 before | Expand all | Expand 10 after
205 // slide-out behavior. See http://crbug.com/172991 205 // slide-out behavior. See http://crbug.com/172991
206 206
207 if (!event->IsScrollGestureEvent() && !event->IsFlingScrollEvent()) 207 if (!event->IsScrollGestureEvent() && !event->IsFlingScrollEvent())
208 return; 208 return;
209 209
210 if (scroller_) 210 if (scroller_)
211 scroller_->OnGestureEvent(event); 211 scroller_->OnGestureEvent(event);
212 event->SetHandled(); 212 event->SetHandled();
213 } 213 }
214 214
215 void MessageView::OnCloseButtonPressed() {
216 controller_->RemoveNotification(notification_id_, true); // By user.
217 }
218
215 void MessageView::OnSlideOut() { 219 void MessageView::OnSlideOut() {
216 controller_->RemoveNotification(notification_id_, true); // By user. 220 controller_->RemoveNotification(notification_id_, true); // By user.
217 } 221 }
218 222
219 void MessageView::SetDrawBackgroundAsActive(bool active) { 223 void MessageView::SetDrawBackgroundAsActive(bool active) {
220 background_view_->background()-> 224 background_view_->background()->
221 SetNativeControlColor(active ? kHoveredButtonBackgroundColor : 225 SetNativeControlColor(active ? kHoveredButtonBackgroundColor :
222 kNotificationBackgroundColor); 226 kNotificationBackgroundColor);
223 SchedulePaint(); 227 SchedulePaint();
224 } 228 }
225 229
226 } // namespace message_center 230 } // namespace message_center
OLDNEW
« no previous file with comments | « ui/message_center/views/message_view.h ('k') | ui/message_center/views/notification_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698