Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(420)

Side by Side Diff: ui/message_center/views/message_popup_collection.cc

Issue 2685283002: Add UpdateNotificationSize to MessageCenterController. (Closed)
Patch Set: address comments Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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::UpdateNotificationSize(
129 const std::string& notification_id) {
130 OnNotificationUpdated(notification_id);
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
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
OLDNEW
« no previous file with comments | « ui/message_center/views/message_popup_collection.h ('k') | ui/message_center/views/notification_view_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698