Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1111)

Unified Diff: chrome/browser/ui/views/message_center/web_notification_tray.h

Issue 18003003: Message center re-organized (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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 e18b36f4c5b4ca9cf0f5e08392899a90293a6a72..8d4010d1699988145a2efdad76cf061bc06d0632 100644
--- a/chrome/browser/ui/views/message_center/web_notification_tray.h
+++ b/chrome/browser/ui/views/message_center/web_notification_tray.h
@@ -7,16 +7,17 @@
#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;
namespace message_center {
class MessageCenter;
-class MessageCenterBubble;
class MessagePopupCollection;
}
@@ -26,9 +27,9 @@ class Widget;
namespace message_center {
-namespace internal {
-class NotificationBubbleWrapper;
-}
+struct PositionInfo;
+
+class MessageCenterWidgetDelegate;
// A MessageCenterTrayDelegate implementation that exposes the MessageCenterTray
// via a system tray icon. The notification popups will be displayed in the
@@ -51,14 +52,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)
@@ -71,7 +64,11 @@ 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 SendHideMessageCenter();
+ void MarkMessageCenterHidden();
+
+ // 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);
@@ -84,12 +81,15 @@ class WebNotificationTray : public message_center::MessageCenterTrayDelegate,
// if the message center should be initialized with the settings visible.
// Returns true if the center is successfully created.
bool ShowMessageCenterInternal(bool show_settings);
+
+ PositionInfo GetPositionInfo();
+
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_;

Powered by Google App Engine
This is Rietveld 408576698