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

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

Issue 12897004: Remove BubbleDelegateView::Show(); call GetWidget()->Show() instead; etc. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixup more BubbleDelegateView::Show() calls. Created 7 years, 9 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 | Annotate | Revision Log
« no previous file with comments | « ui/message_center/views/message_center_bubble.cc ('k') | ui/views/bubble/bubble_delegate.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_bubble.h" 5 #include "ui/message_center/views/message_popup_bubble.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/stl_util.h" 8 #include "base/stl_util.h"
9 #include "ui/message_center/message_center_constants.h" 9 #include "ui/message_center/message_center_constants.h"
10 #include "ui/message_center/notification.h" 10 #include "ui/message_center/notification.h"
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after
153 NotificationList::PopupNotifications popups = 153 NotificationList::PopupNotifications popups =
154 message_center()->notification_list()->GetPopupNotifications(); 154 message_center()->notification_list()->GetPopupNotifications();
155 155
156 if (popups.size() == 0) { 156 if (popups.size() == 0) {
157 if (bubble_view()) 157 if (bubble_view())
158 bubble_view()->delegate()->HideBubble(bubble_view()); // deletes |this| 158 bubble_view()->delegate()->HideBubble(bubble_view()); // deletes |this|
159 return; 159 return;
160 } 160 }
161 161
162 contents_view_->Update(popups); 162 contents_view_->Update(popups);
163 bubble_view()->Show(); 163 bubble_view()->GetWidget()->Show();
164 bubble_view()->UpdateBubble(); 164 bubble_view()->UpdateBubble();
165 165
166 std::set<std::string> old_popup_ids; 166 std::set<std::string> old_popup_ids;
167 old_popup_ids.swap(popup_ids_); 167 old_popup_ids.swap(popup_ids_);
168 168
169 // Start autoclose timers. 169 // Start autoclose timers.
170 for (NotificationList::PopupNotifications::const_iterator iter = 170 for (NotificationList::PopupNotifications::const_iterator iter =
171 popups.begin(); 171 popups.begin();
172 iter != popups.end(); ++iter) { 172 iter != popups.end(); ++iter) {
173 std::string id = (*iter)->id(); 173 std::string id = (*iter)->id();
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
216 scoped_ptr<AutocloseTimer> release_timer(iter->second); 216 scoped_ptr<AutocloseTimer> release_timer(iter->second);
217 autoclose_timers_.erase(iter); 217 autoclose_timers_.erase(iter);
218 } 218 }
219 } 219 }
220 220
221 size_t MessagePopupBubble::NumMessageViewsForTest() const { 221 size_t MessagePopupBubble::NumMessageViewsForTest() const {
222 return contents_view_->NumMessageViews(); 222 return contents_view_->NumMessageViews();
223 } 223 }
224 224
225 } // namespace message_center 225 } // namespace message_center
OLDNEW
« no previous file with comments | « ui/message_center/views/message_center_bubble.cc ('k') | ui/views/bubble/bubble_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698