| 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 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 133 const std::string& notification_id, | 133 const std::string& notification_id, |
| 134 int button_index) { | 134 int button_index) { |
| 135 message_center_->ClickOnNotificationButton(notification_id, button_index); | 135 message_center_->ClickOnNotificationButton(notification_id, button_index); |
| 136 } | 136 } |
| 137 | 137 |
| 138 void MessagePopupCollection::ExpandNotification( | 138 void MessagePopupCollection::ExpandNotification( |
| 139 const std::string& notification_id) { | 139 const std::string& notification_id) { |
| 140 message_center_->ExpandNotification(notification_id); | 140 message_center_->ExpandNotification(notification_id); |
| 141 } | 141 } |
| 142 | 142 |
| 143 void MessagePopupCollection::GroupBodyClicked( | |
| 144 const std::string& last_notification_id) { | |
| 145 // No group views in popup collection. | |
| 146 NOTREACHED(); | |
| 147 } | |
| 148 | |
| 149 // When clicked on the "N more" button, perform some reasonable action. | |
| 150 // TODO(dimich): find out what the reasonable action could be. | |
| 151 void MessagePopupCollection::ExpandGroup(const NotifierId& notifier_id) { | |
| 152 // No group views in popup collection. | |
| 153 NOTREACHED(); | |
| 154 } | |
| 155 | |
| 156 void MessagePopupCollection::RemoveGroup(const NotifierId& notifier_id) { | |
| 157 // No group views in popup collection. | |
| 158 NOTREACHED(); | |
| 159 } | |
| 160 | |
| 161 void MessagePopupCollection::MarkAllPopupsShown() { | 143 void MessagePopupCollection::MarkAllPopupsShown() { |
| 162 std::set<std::string> closed_ids = CloseAllWidgets(); | 144 std::set<std::string> closed_ids = CloseAllWidgets(); |
| 163 for (std::set<std::string>::iterator iter = closed_ids.begin(); | 145 for (std::set<std::string>::iterator iter = closed_ids.begin(); |
| 164 iter != closed_ids.end(); iter++) { | 146 iter != closed_ids.end(); iter++) { |
| 165 message_center_->MarkSinglePopupAsShown(*iter, false); | 147 message_center_->MarkSinglePopupAsShown(*iter, false); |
| 166 } | 148 } |
| 167 } | 149 } |
| 168 | 150 |
| 169 void MessagePopupCollection::UpdateWidgets() { | 151 void MessagePopupCollection::UpdateWidgets() { |
| 170 NotificationList::PopupNotifications popups = | 152 NotificationList::PopupNotifications popups = |
| (...skipping 459 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 630 views::Widget* widget = (*iter)->GetWidget(); | 612 views::Widget* widget = (*iter)->GetWidget(); |
| 631 if (widget) | 613 if (widget) |
| 632 return widget->GetWindowBoundsInScreen(); | 614 return widget->GetWindowBoundsInScreen(); |
| 633 break; | 615 break; |
| 634 } | 616 } |
| 635 } | 617 } |
| 636 return gfx::Rect(); | 618 return gfx::Rect(); |
| 637 } | 619 } |
| 638 | 620 |
| 639 } // namespace message_center | 621 } // namespace message_center |
| OLD | NEW |