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

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

Issue 2897903002: [Notifications] Fix swipe to close for ARC notifications. (Closed)
Patch Set: Created 3 years, 7 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/slide_out_controller.h » ('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 199 matching lines...) Expand 10 before | Expand all | Expand 10 after
210 210
211 if (scroller_) 211 if (scroller_)
212 scroller_->OnGestureEvent(event); 212 scroller_->OnGestureEvent(event);
213 event->SetHandled(); 213 event->SetHandled();
214 } 214 }
215 215
216 ui::Layer* MessageView::GetSlideOutLayer() { 216 ui::Layer* MessageView::GetSlideOutLayer() {
217 return is_nested_ ? layer() : GetWidget()->GetLayer(); 217 return is_nested_ ? layer() : GetWidget()->GetLayer();
218 } 218 }
219 219
220 void MessageView::OnSlideChanged() {}
221
220 void MessageView::OnSlideOut() { 222 void MessageView::OnSlideOut() {
221 controller_->RemoveNotification(notification_id_, true); // By user. 223 controller_->RemoveNotification(notification_id_, true); // By user.
222 } 224 }
223 225
224 void MessageView::OnCloseButtonPressed() { 226 void MessageView::OnCloseButtonPressed() {
225 controller_->RemoveNotification(notification_id_, true); // By user. 227 controller_->RemoveNotification(notification_id_, true); // By user.
226 } 228 }
227 229
228 void MessageView::SetDrawBackgroundAsActive(bool active) { 230 void MessageView::SetDrawBackgroundAsActive(bool active) {
229 background_view_->background()-> 231 background_view_->background()->
230 SetNativeControlColor(active ? kHoveredButtonBackgroundColor : 232 SetNativeControlColor(active ? kHoveredButtonBackgroundColor :
231 kNotificationBackgroundColor); 233 kNotificationBackgroundColor);
232 SchedulePaint(); 234 SchedulePaint();
233 } 235 }
234 236
235 } // namespace message_center 237 } // namespace message_center
OLDNEW
« no previous file with comments | « ui/message_center/views/message_view.h ('k') | ui/message_center/views/slide_out_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698