| 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 "chrome/browser/ui/views/message_center/message_center_widget_delegate.
h" | 10 #include "chrome/browser/ui/views/message_center/message_center_widget_delegate.
h" |
| 11 #include "content/public/browser/notification_observer.h" |
| 12 #include "content/public/browser/notification_registrar.h" |
| 11 #include "ui/base/models/simple_menu_model.h" | 13 #include "ui/base/models/simple_menu_model.h" |
| 12 #include "ui/gfx/rect.h" | 14 #include "ui/gfx/rect.h" |
| 13 #include "ui/message_center/message_center_tray.h" | 15 #include "ui/message_center/message_center_tray.h" |
| 14 #include "ui/message_center/message_center_tray_delegate.h" | 16 #include "ui/message_center/message_center_tray_delegate.h" |
| 15 #include "ui/views/widget/widget_observer.h" | 17 #include "ui/views/widget/widget_observer.h" |
| 16 | 18 |
| 17 class StatusIcon; | 19 class StatusIcon; |
| 18 | 20 |
| 19 namespace message_center { | 21 namespace message_center { |
| 20 class MessageCenter; | 22 class MessageCenter; |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 62 void DisplayFirstRunBalloon(); | 64 void DisplayFirstRunBalloon(); |
| 63 #endif | 65 #endif |
| 64 | 66 |
| 65 // Changes the icon and hovertext based on number of unread notifications. | 67 // Changes the icon and hovertext based on number of unread notifications. |
| 66 void UpdateStatusIcon(); | 68 void UpdateStatusIcon(); |
| 67 void SendHideMessageCenter(); | 69 void SendHideMessageCenter(); |
| 68 void MarkMessageCenterHidden(); | 70 void MarkMessageCenterHidden(); |
| 69 | 71 |
| 70 // Gets the point where the status icon was clicked. | 72 // Gets the point where the status icon was clicked. |
| 71 gfx::Point mouse_click_point() { return mouse_click_point_; } | 73 gfx::Point mouse_click_point() { return mouse_click_point_; } |
| 74 virtual MessageCenterTray* GetMessageCenterTray() OVERRIDE; |
| 72 | 75 |
| 73 private: | 76 private: |
| 74 FRIEND_TEST_ALL_PREFIXES(WebNotificationTrayTest, WebNotifications); | 77 FRIEND_TEST_ALL_PREFIXES(WebNotificationTrayTest, WebNotifications); |
| 75 FRIEND_TEST_ALL_PREFIXES(WebNotificationTrayTest, WebNotificationPopupBubble); | 78 FRIEND_TEST_ALL_PREFIXES(WebNotificationTrayTest, WebNotificationPopupBubble); |
| 76 FRIEND_TEST_ALL_PREFIXES(WebNotificationTrayTest, | 79 FRIEND_TEST_ALL_PREFIXES(WebNotificationTrayTest, |
| 77 ManyMessageCenterNotifications); | 80 ManyMessageCenterNotifications); |
| 78 FRIEND_TEST_ALL_PREFIXES(WebNotificationTrayTest, ManyPopupNotifications); | 81 FRIEND_TEST_ALL_PREFIXES(WebNotificationTrayTest, ManyPopupNotifications); |
| 79 | 82 |
| 80 // The actual process to show the message center. Set |show_settings| to true | 83 // The actual process to show the message center. Set |show_settings| to true |
| 81 // if the message center should be initialized with the settings visible. | 84 // if the message center should be initialized with the settings visible. |
| (...skipping 16 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 |