| 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 199 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 |
| OLD | NEW |