| 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 200 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 211 | 211 |
| 212 if (scroller_) | 212 if (scroller_) |
| 213 scroller_->OnGestureEvent(event); | 213 scroller_->OnGestureEvent(event); |
| 214 event->SetHandled(); | 214 event->SetHandled(); |
| 215 } | 215 } |
| 216 | 216 |
| 217 ui::Layer* MessageView::GetSlideOutLayer() { | 217 ui::Layer* MessageView::GetSlideOutLayer() { |
| 218 return is_nested_ ? layer() : GetWidget()->GetLayer(); | 218 return is_nested_ ? layer() : GetWidget()->GetLayer(); |
| 219 } | 219 } |
| 220 | 220 |
| 221 void MessageView::OnSlideChanged() {} |
| 222 |
| 221 void MessageView::OnSlideOut() { | 223 void MessageView::OnSlideOut() { |
| 222 controller_->RemoveNotification(notification_id_, true); // By user. | 224 controller_->RemoveNotification(notification_id_, true); // By user. |
| 223 } | 225 } |
| 224 | 226 |
| 225 void MessageView::OnCloseButtonPressed() { | 227 void MessageView::OnCloseButtonPressed() { |
| 226 controller_->RemoveNotification(notification_id_, true); // By user. | 228 controller_->RemoveNotification(notification_id_, true); // By user. |
| 227 } | 229 } |
| 228 | 230 |
| 229 void MessageView::SetDrawBackgroundAsActive(bool active) { | 231 void MessageView::SetDrawBackgroundAsActive(bool active) { |
| 230 background_view_->background()-> | 232 background_view_->background()-> |
| 231 SetNativeControlColor(active ? kHoveredButtonBackgroundColor : | 233 SetNativeControlColor(active ? kHoveredButtonBackgroundColor : |
| 232 kNotificationBackgroundColor); | 234 kNotificationBackgroundColor); |
| 233 SchedulePaint(); | 235 SchedulePaint(); |
| 234 } | 236 } |
| 235 | 237 |
| 236 } // namespace message_center | 238 } // namespace message_center |
| OLD | NEW |