| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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_center_view.h" | 5 #include "ui/message_center/views/message_center_view.h" |
| 6 | 6 |
| 7 #include <list> | 7 #include <list> |
| 8 #include <map> | 8 #include <map> |
| 9 | 9 |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| (...skipping 429 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 440 const std::string& notification_id, | 440 const std::string& notification_id, |
| 441 int button_index) { | 441 int button_index) { |
| 442 message_center_->ClickOnNotificationButton(notification_id, button_index); | 442 message_center_->ClickOnNotificationButton(notification_id, button_index); |
| 443 } | 443 } |
| 444 | 444 |
| 445 void MessageCenterView::ClickOnSettingsButton( | 445 void MessageCenterView::ClickOnSettingsButton( |
| 446 const std::string& notification_id) { | 446 const std::string& notification_id) { |
| 447 message_center_->ClickOnSettingsButton(notification_id); | 447 message_center_->ClickOnSettingsButton(notification_id); |
| 448 } | 448 } |
| 449 | 449 |
| 450 void MessageCenterView::UpdateNotification(const std::string& notification_id) { |
| 451 OnNotificationUpdated(notification_id); |
| 452 } |
| 453 |
| 450 void MessageCenterView::AnimationEnded(const gfx::Animation* animation) { | 454 void MessageCenterView::AnimationEnded(const gfx::Animation* animation) { |
| 451 DCHECK_EQ(animation, settings_transition_animation_.get()); | 455 DCHECK_EQ(animation, settings_transition_animation_.get()); |
| 452 | 456 |
| 453 Visibility visibility = | 457 Visibility visibility = |
| 454 mode_ == Mode::SETTINGS ? VISIBILITY_SETTINGS : VISIBILITY_MESSAGE_CENTER; | 458 mode_ == Mode::SETTINGS ? VISIBILITY_SETTINGS : VISIBILITY_MESSAGE_CENTER; |
| 455 message_center_->SetVisibility(visibility); | 459 message_center_->SetVisibility(visibility); |
| 456 | 460 |
| 457 if (source_view_) { | 461 if (source_view_) { |
| 458 source_view_->SetVisible(false); | 462 source_view_->SetVisible(false); |
| 459 } | 463 } |
| (...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 642 // Disable the close-all button since no notification is visible. | 646 // Disable the close-all button since no notification is visible. |
| 643 button_bar_->SetCloseAllButtonEnabled(false); | 647 button_bar_->SetCloseAllButtonEnabled(false); |
| 644 } | 648 } |
| 645 } | 649 } |
| 646 | 650 |
| 647 void MessageCenterView::SetNotificationViewForTest(MessageView* view) { | 651 void MessageCenterView::SetNotificationViewForTest(MessageView* view) { |
| 648 message_list_view_->AddNotificationAt(view, 0); | 652 message_list_view_->AddNotificationAt(view, 0); |
| 649 } | 653 } |
| 650 | 654 |
| 651 } // namespace message_center | 655 } // namespace message_center |
| OLD | NEW |