| 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 #ifndef CHROME_BROWSER_UI_VIEWS_MESSAGE_CENTER_WEB_NOTIFICATION_TRAY_H_ | 5 #ifndef CHROME_BROWSER_UI_VIEWS_MESSAGE_CENTER_WEB_NOTIFICATION_TRAY_H_ |
| 6 #define CHROME_BROWSER_UI_VIEWS_MESSAGE_CENTER_WEB_NOTIFICATION_TRAY_H_ | 6 #define CHROME_BROWSER_UI_VIEWS_MESSAGE_CENTER_WEB_NOTIFICATION_TRAY_H_ |
| 7 | 7 |
| 8 #include "base/memory/weak_ptr.h" | 8 #include "base/memory/weak_ptr.h" |
| 9 #include "chrome/browser/status_icons/status_icon_observer.h" | 9 #include "chrome/browser/status_icons/status_icon_observer.h" |
| 10 #include "ui/base/models/simple_menu_model.h" | 10 #include "ui/base/models/simple_menu_model.h" |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 55 // These are forwarded to WebNotificationTray by | 55 // These are forwarded to WebNotificationTray by |
| 56 // NotificationBubbleWrapper classes since they don't have enough | 56 // NotificationBubbleWrapper classes since they don't have enough |
| 57 // context to provide the required data for TrayBubbleView::Delegate. | 57 // context to provide the required data for TrayBubbleView::Delegate. |
| 58 gfx::Rect GetMessageCenterAnchor(); | 58 gfx::Rect GetMessageCenterAnchor(); |
| 59 gfx::Rect GetPopupAnchor(); | 59 gfx::Rect GetPopupAnchor(); |
| 60 gfx::NativeView GetBubbleWindowContainer(); | 60 gfx::NativeView GetBubbleWindowContainer(); |
| 61 views::TrayBubbleView::AnchorAlignment GetAnchorAlignment(); | 61 views::TrayBubbleView::AnchorAlignment GetAnchorAlignment(); |
| 62 | 62 |
| 63 // StatusIconObserver implementation. | 63 // StatusIconObserver implementation. |
| 64 virtual void OnStatusIconClicked() OVERRIDE; | 64 virtual void OnStatusIconClicked() OVERRIDE; |
| 65 #if defined(OS_WIN) |
| 66 virtual void OnBalloonClicked() OVERRIDE; |
| 67 |
| 68 // This shows a platform-specific balloon informing the user of the existence |
| 69 // of the message center in the status tray area. |
| 70 void DisplayFirstRunBalloon(); |
| 71 #endif |
| 65 | 72 |
| 66 // Changes the icon and hovertext based on number of unread notifications. | 73 // Changes the icon and hovertext based on number of unread notifications. |
| 67 void UpdateStatusIcon(); | 74 void UpdateStatusIcon(); |
| 68 void HideBubbleWithView(const views::TrayBubbleView* bubble_view); | 75 void HideBubbleWithView(const views::TrayBubbleView* bubble_view); |
| 69 | 76 |
| 70 private: | 77 private: |
| 71 FRIEND_TEST_ALL_PREFIXES(WebNotificationTrayTest, WebNotifications); | 78 FRIEND_TEST_ALL_PREFIXES(WebNotificationTrayTest, WebNotifications); |
| 72 FRIEND_TEST_ALL_PREFIXES(WebNotificationTrayTest, WebNotificationPopupBubble); | 79 FRIEND_TEST_ALL_PREFIXES(WebNotificationTrayTest, WebNotificationPopupBubble); |
| 73 FRIEND_TEST_ALL_PREFIXES(WebNotificationTrayTest, | 80 FRIEND_TEST_ALL_PREFIXES(WebNotificationTrayTest, |
| 74 ManyMessageCenterNotifications); | 81 ManyMessageCenterNotifications); |
| (...skipping 17 matching lines...) Expand all Loading... |
| 92 gfx::Point mouse_click_point_; | 99 gfx::Point mouse_click_point_; |
| 93 | 100 |
| 94 bool should_update_tray_content_; | 101 bool should_update_tray_content_; |
| 95 | 102 |
| 96 DISALLOW_COPY_AND_ASSIGN(WebNotificationTray); | 103 DISALLOW_COPY_AND_ASSIGN(WebNotificationTray); |
| 97 }; | 104 }; |
| 98 | 105 |
| 99 } // namespace message_center | 106 } // namespace message_center |
| 100 | 107 |
| 101 #endif // CHROME_BROWSER_UI_VIEWS_MESSAGE_CENTER_WEB_NOTIFICATION_TRAY_H_ | 108 #endif // CHROME_BROWSER_UI_VIEWS_MESSAGE_CENTER_WEB_NOTIFICATION_TRAY_H_ |
| OLD | NEW |