| OLD | NEW |
| 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 Loading... |
| 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 |
| OLD | NEW |