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

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: Comments applied Created 7 years, 6 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 67e2d4f0656d964f1322535cd0a573b0c498ac46..6c32458bd34dff8053f2c9716051c560623c60e8 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,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
@@ -52,14 +54,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 +66,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);
@@ -85,12 +82,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_;
dewittj 2013/07/02 18:43:32 This is troublesome since the widget owns the mess
sidharthms 2013/07/02 21:01:16 The MessageCenterWidget shouldn't ever be closing
scoped_ptr<message_center::MessagePopupCollection> popup_collection_;
StatusIcon* status_icon_;

Powered by Google App Engine
This is Rietveld 408576698