| 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 "content/public/browser/notification_observer.h" |
| 11 #include "content/public/browser/notification_registrar.h" |
| 10 #include "ui/base/models/simple_menu_model.h" | 12 #include "ui/base/models/simple_menu_model.h" |
| 11 #include "ui/message_center/message_center_tray.h" | 13 #include "ui/message_center/message_center_tray.h" |
| 12 #include "ui/message_center/message_center_tray_delegate.h" | 14 #include "ui/message_center/message_center_tray_delegate.h" |
| 13 #include "ui/views/bubble/tray_bubble_view.h" | 15 #include "ui/views/bubble/tray_bubble_view.h" |
| 14 | 16 |
| 15 class StatusIcon; | 17 class StatusIcon; |
| 16 | 18 |
| 17 namespace message_center { | 19 namespace message_center { |
| 18 class MessageCenter; | 20 class MessageCenter; |
| 19 class MessageCenterBubble; | 21 class MessageCenterBubble; |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 65 virtual void OnBalloonClicked() OVERRIDE; | 67 virtual void OnBalloonClicked() OVERRIDE; |
| 66 | 68 |
| 67 // This shows a platform-specific balloon informing the user of the existence | 69 // This shows a platform-specific balloon informing the user of the existence |
| 68 // of the message center in the status tray area. | 70 // of the message center in the status tray area. |
| 69 void DisplayFirstRunBalloon(); | 71 void DisplayFirstRunBalloon(); |
| 70 #endif | 72 #endif |
| 71 | 73 |
| 72 // Changes the icon and hovertext based on number of unread notifications. | 74 // Changes the icon and hovertext based on number of unread notifications. |
| 73 void UpdateStatusIcon(); | 75 void UpdateStatusIcon(); |
| 74 void HideBubbleWithView(const views::TrayBubbleView* bubble_view); | 76 void HideBubbleWithView(const views::TrayBubbleView* bubble_view); |
| 77 virtual MessageCenterTray* GetMessageCenterTray() OVERRIDE; |
| 75 | 78 |
| 76 private: | 79 private: |
| 77 FRIEND_TEST_ALL_PREFIXES(WebNotificationTrayTest, WebNotifications); | 80 FRIEND_TEST_ALL_PREFIXES(WebNotificationTrayTest, WebNotifications); |
| 78 FRIEND_TEST_ALL_PREFIXES(WebNotificationTrayTest, WebNotificationPopupBubble); | 81 FRIEND_TEST_ALL_PREFIXES(WebNotificationTrayTest, WebNotificationPopupBubble); |
| 79 FRIEND_TEST_ALL_PREFIXES(WebNotificationTrayTest, | 82 FRIEND_TEST_ALL_PREFIXES(WebNotificationTrayTest, |
| 80 ManyMessageCenterNotifications); | 83 ManyMessageCenterNotifications); |
| 81 FRIEND_TEST_ALL_PREFIXES(WebNotificationTrayTest, ManyPopupNotifications); | 84 FRIEND_TEST_ALL_PREFIXES(WebNotificationTrayTest, ManyPopupNotifications); |
| 82 | 85 |
| 83 // The actual process to show the message center. Set |show_settings| to true | 86 // The actual process to show the message center. Set |show_settings| to true |
| 84 // if the message center should be initialized with the settings visible. | 87 // if the message center should be initialized with the settings visible. |
| (...skipping 13 matching lines...) Expand all Loading... |
| 98 gfx::Point mouse_click_point_; | 101 gfx::Point mouse_click_point_; |
| 99 | 102 |
| 100 bool should_update_tray_content_; | 103 bool should_update_tray_content_; |
| 101 | 104 |
| 102 DISALLOW_COPY_AND_ASSIGN(WebNotificationTray); | 105 DISALLOW_COPY_AND_ASSIGN(WebNotificationTray); |
| 103 }; | 106 }; |
| 104 | 107 |
| 105 } // namespace message_center | 108 } // namespace message_center |
| 106 | 109 |
| 107 #endif // CHROME_BROWSER_UI_VIEWS_MESSAGE_CENTER_WEB_NOTIFICATION_TRAY_H_ | 110 #endif // CHROME_BROWSER_UI_VIEWS_MESSAGE_CENTER_WEB_NOTIFICATION_TRAY_H_ |
| OLD | NEW |