OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 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 "chrome/browser/ui/views/message_center/web_notification_tray.h" | 5 #include "chrome/browser/ui/views/message_center/web_notification_tray.h" |
6 | 6 |
7 #include "base/i18n/number_formatting.h" | 7 #include "base/i18n/number_formatting.h" |
8 #include "base/strings/string16.h" | 8 #include "base/strings/string16.h" |
9 #include "base/strings/utf_string_conversions.h" | 9 #include "base/strings/utf_string_conversions.h" |
10 #include "chrome/browser/browser_process.h" | 10 #include "chrome/browser/browser_process.h" |
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
191 } | 191 } |
192 | 192 |
193 bool WebNotificationTray::ShowMessageCenter() { | 193 bool WebNotificationTray::ShowMessageCenter() { |
194 return ShowMessageCenterInternal(false /* show_settings */); | 194 return ShowMessageCenterInternal(false /* show_settings */); |
195 } | 195 } |
196 | 196 |
197 void WebNotificationTray::HideMessageCenter() { | 197 void WebNotificationTray::HideMessageCenter() { |
198 message_center_bubble_.reset(); | 198 message_center_bubble_.reset(); |
199 } | 199 } |
200 | 200 |
201 void WebNotificationTray::UpdatePopups() { | |
202 // |popup_collection_| receives notification add/remove events and updates | |
203 // itself, so this method doesn't need to do anything. | |
204 // TODO(mukai): remove this method (currently this is used by | |
205 // non-rich-notifications in ChromeOS). | |
206 }; | |
207 | |
208 bool WebNotificationTray::ShowNotifierSettings() { | 201 bool WebNotificationTray::ShowNotifierSettings() { |
209 if (message_center_bubble_) { | 202 if (message_center_bubble_) { |
210 static_cast<MessageCenterBubble*>( | 203 static_cast<MessageCenterBubble*>( |
211 message_center_bubble_->bubble())->SetSettingsVisible(); | 204 message_center_bubble_->bubble())->SetSettingsVisible(); |
212 return true; | 205 return true; |
213 } | 206 } |
214 return ShowMessageCenterInternal(true /* show_settings */); | 207 return ShowMessageCenterInternal(true /* show_settings */); |
215 } | 208 } |
216 | 209 |
217 void WebNotificationTray::OnMessageCenterTrayChanged() { | 210 void WebNotificationTray::OnMessageCenterTrayChanged() { |
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
334 | 327 |
335 message_center::MessageCenterBubble* | 328 message_center::MessageCenterBubble* |
336 WebNotificationTray::GetMessageCenterBubbleForTest() { | 329 WebNotificationTray::GetMessageCenterBubbleForTest() { |
337 if (!message_center_bubble_.get()) | 330 if (!message_center_bubble_.get()) |
338 return NULL; | 331 return NULL; |
339 return static_cast<message_center::MessageCenterBubble*>( | 332 return static_cast<message_center::MessageCenterBubble*>( |
340 message_center_bubble_->bubble()); | 333 message_center_bubble_->bubble()); |
341 } | 334 } |
342 | 335 |
343 } // namespace message_center | 336 } // namespace message_center |
OLD | NEW |