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 186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
197 // |popup_collection_| receives notification add/remove events and updates | 197 // |popup_collection_| receives notification add/remove events and updates |
198 // itself, so this method doesn't need to do anything. | 198 // itself, so this method doesn't need to do anything. |
199 // TODO(mukai): remove this method (currently this is used by | 199 // TODO(mukai): remove this method (currently this is used by |
200 // non-rich-notifications in ChromeOS). | 200 // non-rich-notifications in ChromeOS). |
201 }; | 201 }; |
202 | 202 |
203 void WebNotificationTrayWin::OnMessageCenterTrayChanged() { | 203 void WebNotificationTrayWin::OnMessageCenterTrayChanged() { |
204 // See the comments in ash/system/web_notification/web_notification_tray.cc | 204 // See the comments in ash/system/web_notification/web_notification_tray.cc |
205 // for why PostTask. | 205 // for why PostTask. |
206 should_update_tray_content_ = true; | 206 should_update_tray_content_ = true; |
207 MessageLoop::current()->PostTask( | 207 base::MessageLoop::current()->PostTask( |
208 FROM_HERE, | 208 FROM_HERE, |
209 base::Bind(&WebNotificationTrayWin::UpdateStatusIcon, AsWeakPtr())); | 209 base::Bind(&WebNotificationTrayWin::UpdateStatusIcon, AsWeakPtr())); |
210 } | 210 } |
211 | 211 |
212 gfx::Rect WebNotificationTrayWin::GetMessageCenterAnchor() { | 212 gfx::Rect WebNotificationTrayWin::GetMessageCenterAnchor() { |
213 return GetMouseAnchorRect(mouse_click_point_); | 213 return GetMouseAnchorRect(mouse_click_point_); |
214 } | 214 } |
215 | 215 |
216 gfx::Rect WebNotificationTrayWin::GetPopupAnchor() { | 216 gfx::Rect WebNotificationTrayWin::GetPopupAnchor() { |
217 return GetCornerAnchorRect(); | 217 return GetCornerAnchorRect(); |
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
322 | 322 |
323 message_center::MessageCenterBubble* | 323 message_center::MessageCenterBubble* |
324 WebNotificationTrayWin::GetMessageCenterBubbleForTest() { | 324 WebNotificationTrayWin::GetMessageCenterBubbleForTest() { |
325 if (!message_center_bubble_.get()) | 325 if (!message_center_bubble_.get()) |
326 return NULL; | 326 return NULL; |
327 return static_cast<message_center::MessageCenterBubble*>( | 327 return static_cast<message_center::MessageCenterBubble*>( |
328 message_center_bubble_->bubble()); | 328 message_center_bubble_->bubble()); |
329 } | 329 } |
330 | 330 |
331 } // namespace message_center | 331 } // namespace message_center |
OLD | NEW |