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 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
97 // Don't remove the notification only when it's not pinned. | 97 // Don't remove the notification only when it's not pinned. |
98 if (!notification->pinned()) | 98 if (!notification->pinned()) |
99 message_center_->RemoveNotification(notification_id, by_user); | 99 message_center_->RemoveNotification(notification_id, by_user); |
100 else | 100 else |
101 message_center_->MarkSinglePopupAsShown(notification_id, true /* read */); | 101 message_center_->MarkSinglePopupAsShown(notification_id, true /* read */); |
102 | 102 |
103 break; | 103 break; |
104 } | 104 } |
105 } | 105 } |
106 | 106 |
107 scoped_ptr<ui::MenuModel> MessagePopupCollection::CreateMenuModel( | 107 std::unique_ptr<ui::MenuModel> MessagePopupCollection::CreateMenuModel( |
108 const NotifierId& notifier_id, | 108 const NotifierId& notifier_id, |
109 const base::string16& display_source) { | 109 const base::string16& display_source) { |
110 return tray_->CreateNotificationMenuModel(notifier_id, display_source); | 110 return tray_->CreateNotificationMenuModel(notifier_id, display_source); |
111 } | 111 } |
112 | 112 |
113 bool MessagePopupCollection::HasClickedListener( | 113 bool MessagePopupCollection::HasClickedListener( |
114 const std::string& notification_id) { | 114 const std::string& notification_id) { |
115 return message_center_->HasClickedListener(notification_id); | 115 return message_center_->HasClickedListener(notification_id); |
116 } | 116 } |
117 | 117 |
(...skipping 420 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
538 views::Widget* widget = (*iter)->GetWidget(); | 538 views::Widget* widget = (*iter)->GetWidget(); |
539 if (widget) | 539 if (widget) |
540 return widget->GetWindowBoundsInScreen(); | 540 return widget->GetWindowBoundsInScreen(); |
541 break; | 541 break; |
542 } | 542 } |
543 } | 543 } |
544 return gfx::Rect(); | 544 return gfx::Rect(); |
545 } | 545 } |
546 | 546 |
547 } // namespace message_center | 547 } // namespace message_center |
OLD | NEW |