OLD | NEW |
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 "chrome/browser/ui/views/message_center/web_notification_tray_win.h" | 5 #include "chrome/browser/ui/views/message_center/web_notification_tray_win.h" |
6 | 6 |
7 #include "base/i18n/number_formatting.h" | 7 #include "base/i18n/number_formatting.h" |
8 #include "base/string16.h" | 8 #include "base/string16.h" |
9 #include "base/utf_string_conversions.h" | 9 #include "base/utf_string_conversions.h" |
10 #include "chrome/browser/browser_process.h" | 10 #include "chrome/browser/browser_process.h" |
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
162 void WebNotificationTrayWin::HideMessageCenter() { | 162 void WebNotificationTrayWin::HideMessageCenter() { |
163 message_center_bubble_.reset(); | 163 message_center_bubble_.reset(); |
164 } | 164 } |
165 | 165 |
166 void WebNotificationTrayWin::UpdateMessageCenter() { | 166 void WebNotificationTrayWin::UpdateMessageCenter() { |
167 if (message_center_bubble_.get()) | 167 if (message_center_bubble_.get()) |
168 message_center_bubble_->bubble()->ScheduleUpdate(); | 168 message_center_bubble_->bubble()->ScheduleUpdate(); |
169 } | 169 } |
170 | 170 |
171 void WebNotificationTrayWin::UpdatePopups() { | 171 void WebNotificationTrayWin::UpdatePopups() { |
172 if (popup_collection_.get()) | 172 // |popup_collection_| receives notification add/remove events and updates |
173 popup_collection_->UpdatePopups(); | 173 // itself, so this method doesn't need to do anything. |
| 174 // TODO(mukai): remove this method (currently this is used by |
| 175 // non-rich-notifications in ChromeOS). |
174 }; | 176 }; |
175 | 177 |
176 void WebNotificationTrayWin::OnMessageCenterTrayChanged() { | 178 void WebNotificationTrayWin::OnMessageCenterTrayChanged() { |
177 UpdateStatusIcon(); | 179 UpdateStatusIcon(); |
178 } | 180 } |
179 | 181 |
180 gfx::Rect WebNotificationTrayWin::GetMessageCenterAnchor() { | 182 gfx::Rect WebNotificationTrayWin::GetMessageCenterAnchor() { |
181 return GetMouseAnchorRect(mouse_click_point_); | 183 return GetMouseAnchorRect(mouse_click_point_); |
182 } | 184 } |
183 | 185 |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
246 | 248 |
247 message_center::MessageCenterBubble* | 249 message_center::MessageCenterBubble* |
248 WebNotificationTrayWin::GetMessageCenterBubbleForTest() { | 250 WebNotificationTrayWin::GetMessageCenterBubbleForTest() { |
249 if (!message_center_bubble_.get()) | 251 if (!message_center_bubble_.get()) |
250 return NULL; | 252 return NULL; |
251 return static_cast<message_center::MessageCenterBubble*>( | 253 return static_cast<message_center::MessageCenterBubble*>( |
252 message_center_bubble_->bubble()); | 254 message_center_bubble_->bubble()); |
253 } | 255 } |
254 | 256 |
255 } // namespace message_center | 257 } // namespace message_center |
OLD | NEW |