| 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 "base/prefs/pref_member.h" | 9 #include "base/prefs/pref_member.h" |
| 10 #include "chrome/browser/status_icons/status_icon_menu_model.h" | 10 #include "chrome/browser/status_icons/status_icon_menu_model.h" |
| (...skipping 20 matching lines...) Expand all Loading... |
| 31 } | 31 } |
| 32 | 32 |
| 33 namespace views { | 33 namespace views { |
| 34 class Widget; | 34 class Widget; |
| 35 } | 35 } |
| 36 | 36 |
| 37 namespace message_center { | 37 namespace message_center { |
| 38 | 38 |
| 39 struct PositionInfo; | 39 struct PositionInfo; |
| 40 | 40 |
| 41 class DesktopPopupAlignmentDelegate; |
| 41 class MessageCenterWidgetDelegate; | 42 class MessageCenterWidgetDelegate; |
| 42 | 43 |
| 43 // A MessageCenterTrayDelegate implementation that exposes the MessageCenterTray | 44 // A MessageCenterTrayDelegate implementation that exposes the MessageCenterTray |
| 44 // via a system tray icon. The notification popups will be displayed in the | 45 // via a system tray icon. The notification popups will be displayed in the |
| 45 // corner of the screen and the message center will be displayed by the system | 46 // corner of the screen and the message center will be displayed by the system |
| 46 // tray icon on click. | 47 // tray icon on click. |
| 47 class WebNotificationTray : public message_center::MessageCenterTrayDelegate, | 48 class WebNotificationTray : public message_center::MessageCenterTrayDelegate, |
| 48 public StatusIconObserver, | 49 public StatusIconObserver, |
| 49 public base::SupportsWeakPtr<WebNotificationTray>, | 50 public base::SupportsWeakPtr<WebNotificationTray>, |
| 50 public StatusIconMenuModel::Delegate { | 51 public StatusIconMenuModel::Delegate { |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 106 | 107 |
| 107 #if defined(OS_WIN) | 108 #if defined(OS_WIN) |
| 108 // This member variable keeps track of whether EnforceStatusIconVisible has | 109 // This member variable keeps track of whether EnforceStatusIconVisible has |
| 109 // been invoked on this machine, so the user still has control after we try | 110 // been invoked on this machine, so the user still has control after we try |
| 110 // promoting it the first time. | 111 // promoting it the first time. |
| 111 scoped_ptr<BooleanPrefMember> did_force_tray_visible_; | 112 scoped_ptr<BooleanPrefMember> did_force_tray_visible_; |
| 112 #endif | 113 #endif |
| 113 | 114 |
| 114 MessageCenterWidgetDelegate* message_center_delegate_; | 115 MessageCenterWidgetDelegate* message_center_delegate_; |
| 115 scoped_ptr<message_center::MessagePopupCollection> popup_collection_; | 116 scoped_ptr<message_center::MessagePopupCollection> popup_collection_; |
| 117 scoped_ptr<message_center::DesktopPopupAlignmentDelegate> alignment_delegate_; |
| 116 | 118 |
| 117 StatusIcon* status_icon_; | 119 StatusIcon* status_icon_; |
| 118 StatusIconMenuModel* status_icon_menu_; | 120 StatusIconMenuModel* status_icon_menu_; |
| 119 scoped_ptr<MessageCenterTray> message_center_tray_; | 121 scoped_ptr<MessageCenterTray> message_center_tray_; |
| 120 gfx::Point mouse_click_point_; | 122 gfx::Point mouse_click_point_; |
| 121 | 123 |
| 122 bool should_update_tray_content_; | 124 bool should_update_tray_content_; |
| 123 bool last_quiet_mode_state_; | 125 bool last_quiet_mode_state_; |
| 124 base::string16 title_; | 126 base::string16 title_; |
| 125 | 127 |
| 126 DISALLOW_COPY_AND_ASSIGN(WebNotificationTray); | 128 DISALLOW_COPY_AND_ASSIGN(WebNotificationTray); |
| 127 }; | 129 }; |
| 128 | 130 |
| 129 } // namespace message_center | 131 } // namespace message_center |
| 130 | 132 |
| 131 #endif // CHROME_BROWSER_UI_VIEWS_MESSAGE_CENTER_WEB_NOTIFICATION_TRAY_H_ | 133 #endif // CHROME_BROWSER_UI_VIEWS_MESSAGE_CENTER_WEB_NOTIFICATION_TRAY_H_ |
| OLD | NEW |