Chromium Code Reviews| Index: chrome/browser/ui/views/message_center/web_notification_tray.h |
| diff --git a/chrome/browser/ui/views/message_center/web_notification_tray.h b/chrome/browser/ui/views/message_center/web_notification_tray.h |
| index 67e2d4f0656d964f1322535cd0a573b0c498ac46..3c230afd0bc5f5284bade88d79c216b916b36f11 100644 |
| --- a/chrome/browser/ui/views/message_center/web_notification_tray.h |
| +++ b/chrome/browser/ui/views/message_center/web_notification_tray.h |
| @@ -7,10 +7,12 @@ |
| #include "base/memory/weak_ptr.h" |
| #include "chrome/browser/status_icons/status_icon_observer.h" |
| +#include "chrome/browser/ui/views/message_center/message_center_widget_delegate.h" |
| #include "ui/base/models/simple_menu_model.h" |
| +#include "ui/gfx/rect.h" |
| #include "ui/message_center/message_center_tray.h" |
| #include "ui/message_center/message_center_tray_delegate.h" |
| -#include "ui/views/bubble/tray_bubble_view.h" |
| +#include "ui/views/widget/widget_observer.h" |
| class StatusIcon; |
| @@ -26,9 +28,7 @@ class Widget; |
| namespace message_center { |
| -namespace internal { |
| -class NotificationBubbleWrapper; |
| -} |
| +class MessageCenterWidgetDelegate; |
| // A MessageCenterTrayDelegate implementation that exposes the MessageCenterTray |
| // via a system tray icon. The notification popups will be displayed in the |
| @@ -36,6 +36,7 @@ class NotificationBubbleWrapper; |
| // tray icon on click. |
| class WebNotificationTray : public message_center::MessageCenterTrayDelegate, |
| public StatusIconObserver, |
| + public views::WidgetObserver, |
|
dewittj
2013/06/28 01:13:18
This doesn't appear to be used in this class.
sidharthms
2013/07/02 18:09:51
Done.
|
| public base::SupportsWeakPtr<WebNotificationTray> { |
| public: |
| WebNotificationTray(); |
| @@ -52,14 +53,6 @@ class WebNotificationTray : public message_center::MessageCenterTrayDelegate, |
| virtual void OnMessageCenterTrayChanged() OVERRIDE; |
| virtual bool ShowNotifierSettings() OVERRIDE; |
| - // These are forwarded to WebNotificationTray by |
| - // NotificationBubbleWrapper classes since they don't have enough |
| - // context to provide the required data for TrayBubbleView::Delegate. |
| - gfx::Rect GetMessageCenterAnchor(); |
| - gfx::Rect GetPopupAnchor(); |
| - gfx::NativeView GetBubbleWindowContainer(); |
| - views::TrayBubbleView::AnchorAlignment GetAnchorAlignment(); |
| - |
| // StatusIconObserver implementation. |
| virtual void OnStatusIconClicked() OVERRIDE; |
| #if defined(OS_WIN) |
| @@ -72,7 +65,10 @@ class WebNotificationTray : public message_center::MessageCenterTrayDelegate, |
| // Changes the icon and hovertext based on number of unread notifications. |
| void UpdateStatusIcon(); |
| - void HideBubbleWithView(const views::TrayBubbleView* bubble_view); |
| + void HideBubble(); |
| + |
| + // Gets the point where the status icon was clicked. |
| + gfx::Point mouse_click_point() { return mouse_click_point_; } |
| private: |
| FRIEND_TEST_ALL_PREFIXES(WebNotificationTrayTest, WebNotifications); |
| @@ -88,9 +84,9 @@ class WebNotificationTray : public message_center::MessageCenterTrayDelegate, |
| StatusIcon* GetStatusIcon(); |
| void DestroyStatusIcon(); |
| void AddQuietModeMenu(StatusIcon* status_icon); |
| - message_center::MessageCenterBubble* GetMessageCenterBubbleForTest(); |
| + MessageCenterWidgetDelegate* GetMessageCenterWidgetDelegateForTest(); |
| - scoped_ptr<internal::NotificationBubbleWrapper> message_center_bubble_; |
| + MessageCenterWidgetDelegate* message_center_delegate_; |
| scoped_ptr<message_center::MessagePopupCollection> popup_collection_; |
| StatusIcon* status_icon_; |