diff options
author | mukai@chromium.org <mukai@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-04-22 21:26:41 +0000 |
---|---|---|
committer | mukai@chromium.org <mukai@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-04-22 21:26:41 +0000 |
commit | c13fca6bff97f6254b4396be6b15d3ce5977e29f (patch) | |
tree | 0ef6420ff2bc1b823c0539cc188486bae71a23a3 /ui | |
parent | e545cc4bcd256ed9bb06607af09c06d74e5a95e9 (diff) | |
download | chromium_src-c13fca6bff97f6254b4396be6b15d3ce5977e29f.zip chromium_src-c13fca6bff97f6254b4396be6b15d3ce5977e29f.tar.gz chromium_src-c13fca6bff97f6254b4396be6b15d3ce5977e29f.tar.bz2 |
Fixes the widget positions.
The current code uses the top line of the existing toasts as the base,
but somehow it computes the height of existing toasts again and use it.
As this result, some notification may not appear even though there's
enough space.
BUG=NONE
R=dewittj@chromium.org,dharcourt@chromium.org
Review URL: https://chromiumcodereview.appspot.com/13937012
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@195601 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui')
-rw-r--r-- | ui/message_center/views/message_popup_collection.cc | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/ui/message_center/views/message_popup_collection.cc b/ui/message_center/views/message_popup_collection.cc index 2bf7a1f..fb44144 100644 --- a/ui/message_center/views/message_popup_collection.cc +++ b/ui/message_center/views/message_popup_collection.cc @@ -200,6 +200,9 @@ void MessagePopupCollection::UpdateWidgets() { // items may be ignored if there are no room to place them. for (NotificationList::PopupNotifications::const_reverse_iterator iter = popups.rbegin(); iter != popups.rend(); ++iter) { + if (toasts_.find((*iter)->id()) != toasts_.end()) + continue; + MessageView* view = NotificationView::Create(*(*iter), message_center_, true); int view_height = GetToastSize(view).height(); @@ -208,11 +211,6 @@ void MessagePopupCollection::UpdateWidgets() { break; } - if (toasts_.find((*iter)->id()) != toasts_.end()) { - delete view; - continue; - } - ToastContentsView* toast = new ToastContentsView( *iter, AsWeakPtr(), message_center_); views::Widget* widget = toast->CreateWidget(parent_); |