Chromium Code Reviews| 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_popup_collection.h" | 5 #include "ui/message_center/views/message_popup_collection.h" |
| 6 | 6 |
| 7 #include <set> | 7 #include <set> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/i18n/rtl.h" | 10 #include "base/i18n/rtl.h" |
| (...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 118 const std::string& notification_id, | 118 const std::string& notification_id, |
| 119 int button_index) { | 119 int button_index) { |
| 120 message_center_->ClickOnNotificationButton(notification_id, button_index); | 120 message_center_->ClickOnNotificationButton(notification_id, button_index); |
| 121 } | 121 } |
| 122 | 122 |
| 123 void MessagePopupCollection::ClickOnSettingsButton( | 123 void MessagePopupCollection::ClickOnSettingsButton( |
| 124 const std::string& notification_id) { | 124 const std::string& notification_id) { |
| 125 message_center_->ClickOnSettingsButton(notification_id); | 125 message_center_->ClickOnSettingsButton(notification_id); |
| 126 } | 126 } |
| 127 | 127 |
| 128 void MessagePopupCollection::UpdateNotification( | |
| 129 const std::string& notification_id) { | |
| 130 OnNotificationUpdated(notification_id); | |
|
yoshiki
2017/02/14 02:41:39
Out of curious, is it called actually? IIRC, Messa
Eliot Courtney
2017/02/14 03:32:15
Good catch~! I've updated the ToastContentsView me
| |
| 131 } | |
| 132 | |
| 128 void MessagePopupCollection::MarkAllPopupsShown() { | 133 void MessagePopupCollection::MarkAllPopupsShown() { |
| 129 std::set<std::string> closed_ids = CloseAllWidgets(); | 134 std::set<std::string> closed_ids = CloseAllWidgets(); |
| 130 for (std::set<std::string>::iterator iter = closed_ids.begin(); | 135 for (std::set<std::string>::iterator iter = closed_ids.begin(); |
| 131 iter != closed_ids.end(); iter++) { | 136 iter != closed_ids.end(); iter++) { |
| 132 message_center_->MarkSinglePopupAsShown(*iter, false); | 137 message_center_->MarkSinglePopupAsShown(*iter, false); |
| 133 } | 138 } |
| 134 } | 139 } |
| 135 | 140 |
| 136 void MessagePopupCollection::UpdateWidgets() { | 141 void MessagePopupCollection::UpdateWidgets() { |
| 137 if (message_center_->IsMessageCenterVisible()) { | 142 if (message_center_->IsMessageCenterVisible()) { |
| (...skipping 401 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 539 views::Widget* widget = (*iter)->GetWidget(); | 544 views::Widget* widget = (*iter)->GetWidget(); |
| 540 if (widget) | 545 if (widget) |
| 541 return widget->GetWindowBoundsInScreen(); | 546 return widget->GetWindowBoundsInScreen(); |
| 542 break; | 547 break; |
| 543 } | 548 } |
| 544 } | 549 } |
| 545 return gfx::Rect(); | 550 return gfx::Rect(); |
| 546 } | 551 } |
| 547 | 552 |
| 548 } // namespace message_center | 553 } // namespace message_center |
| OLD | NEW |