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

Side by Side Diff: ui/message_center/message_center_tray.cc

Issue 99543003: Fix popup crash on ChromeOS. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase + WS nit. Created 7 years 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
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/message_center_tray.h" 5 #include "ui/message_center/message_center_tray.h"
6 6
7 #include "base/observer_list.h" 7 #include "base/observer_list.h"
8 #include "base/strings/utf_string_conversions.h" 8 #include "base/strings/utf_string_conversions.h"
9 #include "grit/ui_strings.h" 9 #include "grit/ui_strings.h"
10 #include "ui/base/l10n/l10n_util.h" 10 #include "ui/base/l10n/l10n_util.h"
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 HidePopupBubbleInternal(); 95 HidePopupBubbleInternal();
96 NotifyMessageCenterTrayChanged(); 96 NotifyMessageCenterTrayChanged();
97 97
98 return true; 98 return true;
99 } 99 }
100 100
101 void MessageCenterTray::HidePopupBubbleInternal() { 101 void MessageCenterTray::HidePopupBubbleInternal() {
102 if (!popups_visible_) 102 if (!popups_visible_)
103 return; 103 return;
104 104
105 // This is called before HidePopups so that we don't double-call this when we 105 delegate_->HidePopups();
106 // see the results of HidePopups via MessageCenterObserver.
107 popups_visible_ = false; 106 popups_visible_ = false;
108
109 delegate_->HidePopups();
110 } 107 }
111 108
112 void MessageCenterTray::ShowNotifierSettingsBubble() { 109 void MessageCenterTray::ShowNotifierSettingsBubble() {
113 if (popups_visible_) 110 if (popups_visible_)
114 HidePopupBubbleInternal(); 111 HidePopupBubbleInternal();
115 112
116 message_center_visible_ = delegate_->ShowNotifierSettings(); 113 message_center_visible_ = delegate_->ShowNotifierSettings();
117 message_center_->SetVisibility(message_center::VISIBILITY_SETTINGS); 114 message_center_->SetVisibility(message_center::VISIBILITY_SETTINGS);
118 115
119 NotifyMessageCenterTrayChanged(); 116 NotifyMessageCenterTrayChanged();
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
167 ShowPopupBubble(); 164 ShowPopupBubble();
168 165
169 NotifyMessageCenterTrayChanged(); 166 NotifyMessageCenterTrayChanged();
170 } 167 }
171 168
172 void MessageCenterTray::NotifyMessageCenterTrayChanged() { 169 void MessageCenterTray::NotifyMessageCenterTrayChanged() {
173 delegate_->OnMessageCenterTrayChanged(); 170 delegate_->OnMessageCenterTrayChanged();
174 } 171 }
175 172
176 } // namespace message_center 173 } // namespace message_center
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/message_center/web_notification_tray.cc ('k') | ui/message_center/views/message_popup_collection.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698