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

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: 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 107
stevenjb 2013/12/02 23:26:17 nit: Extra WS line here?
109 delegate_->HidePopups();
110 } 108 }
111 109
112 void MessageCenterTray::ShowNotifierSettingsBubble() { 110 void MessageCenterTray::ShowNotifierSettingsBubble() {
113 if (popups_visible_) 111 if (popups_visible_)
114 HidePopupBubbleInternal(); 112 HidePopupBubbleInternal();
115 113
116 message_center_visible_ = delegate_->ShowNotifierSettings(); 114 message_center_visible_ = delegate_->ShowNotifierSettings();
117 message_center_->SetVisibility(message_center::VISIBILITY_SETTINGS); 115 message_center_->SetVisibility(message_center::VISIBILITY_SETTINGS);
118 116
119 NotifyMessageCenterTrayChanged(); 117 NotifyMessageCenterTrayChanged();
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
167 ShowPopupBubble(); 165 ShowPopupBubble();
168 166
169 NotifyMessageCenterTrayChanged(); 167 NotifyMessageCenterTrayChanged();
170 } 168 }
171 169
172 void MessageCenterTray::NotifyMessageCenterTrayChanged() { 170 void MessageCenterTray::NotifyMessageCenterTrayChanged() {
173 delegate_->OnMessageCenterTrayChanged(); 171 delegate_->OnMessageCenterTrayChanged();
174 } 172 }
175 173
176 } // namespace message_center 174 } // 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