summaryrefslogtreecommitdiffstats
path: root/chromium/ui/message_center/views/message_center_view.h
diff options
context:
space:
mode:
Diffstat (limited to 'chromium/ui/message_center/views/message_center_view.h')
-rw-r--r--chromium/ui/message_center/views/message_center_view.h38
1 files changed, 13 insertions, 25 deletions
diff --git a/chromium/ui/message_center/views/message_center_view.h b/chromium/ui/message_center/views/message_center_view.h
index b64f770a8e6..94dd139213c 100644
--- a/chromium/ui/message_center/views/message_center_view.h
+++ b/chromium/ui/message_center/views/message_center_view.h
@@ -5,7 +5,6 @@
#ifndef UI_MESSAGE_CENTER_VIEWS_MESSAGE_CENTER_VIEW_H_
#define UI_MESSAGE_CENTER_VIEWS_MESSAGE_CENTER_VIEW_H_
-#include "ui/views/view.h"
#include "ui/gfx/animation/animation_delegate.h"
#include "ui/message_center/message_center_export.h"
@@ -14,6 +13,7 @@
#include "ui/message_center/views/message_center_controller.h"
#include "ui/message_center/views/message_view.h"
#include "ui/views/controls/button/button.h"
+#include "ui/views/view.h"
namespace gfx {
class MultiAnimation;
@@ -25,7 +25,6 @@ class Button;
namespace message_center {
-class GroupView;
class MessageCenter;
class MessageCenterBubble;
class NotificationCenterButton;
@@ -33,6 +32,7 @@ class MessageCenterButtonBar;
class MessageCenterTray;
class MessageCenterView;
class MessageView;
+class MessageViewContextMenuController;
class MessageListView;
class NotificationView;
class NotifierSettingsView;
@@ -48,7 +48,8 @@ class MESSAGE_CENTER_EXPORT MessageCenterView : public views::View,
MessageCenterTray* tray,
int max_height,
bool initially_settings_visible,
- bool top_down);
+ bool top_down,
+ const base::string16& title);
virtual ~MessageCenterView();
void SetNotifications(const NotificationList::Notifications& notifications);
@@ -61,14 +62,15 @@ class MESSAGE_CENTER_EXPORT MessageCenterView : public views::View,
void SetSettingsVisible(bool visible);
void OnSettingsChanged();
bool settings_visible() const { return settings_visible_; }
+ MessageCenterTray* tray() { return tray_; }
void SetIsClosing(bool is_closing);
protected:
// Overridden from views::View:
virtual void Layout() OVERRIDE;
- virtual gfx::Size GetPreferredSize() OVERRIDE;
- virtual int GetHeightForWidth(int width) OVERRIDE;
+ virtual gfx::Size GetPreferredSize() const OVERRIDE;
+ virtual int GetHeightForWidth(int width) const OVERRIDE;
virtual bool OnMouseWheel(const ui::MouseWheelEvent& event) OVERRIDE;
virtual void OnMouseExited(const ui::MouseEvent& event) OVERRIDE;
@@ -82,17 +84,12 @@ class MESSAGE_CENTER_EXPORT MessageCenterView : public views::View,
virtual void ClickOnNotification(const std::string& notification_id) OVERRIDE;
virtual void RemoveNotification(const std::string& notification_id,
bool by_user) OVERRIDE;
- virtual void DisableNotificationsFromThisSource(
- const NotifierId& notifier_id) OVERRIDE;
- virtual void ShowNotifierSettingsBubble() OVERRIDE;
+ virtual scoped_ptr<ui::MenuModel> CreateMenuModel(
+ const NotifierId& notifier_id,
+ const base::string16& display_source) OVERRIDE;
virtual bool HasClickedListener(const std::string& notification_id) OVERRIDE;
virtual void ClickOnNotificationButton(const std::string& notification_id,
int button_index) OVERRIDE;
- virtual void ExpandNotification(const std::string& notification_id) OVERRIDE;
- virtual void GroupBodyClicked(const std::string& last_notification_id)
- OVERRIDE;
- virtual void ExpandGroup(const NotifierId& notifier_id) OVERRIDE;
- virtual void RemoveGroup(const NotifierId& notifier_id) OVERRIDE;
// Overridden from gfx::AnimationDelegate:
virtual void AnimationEnded(const gfx::Animation* animation) OVERRIDE;
@@ -102,12 +99,6 @@ class MESSAGE_CENTER_EXPORT MessageCenterView : public views::View,
private:
friend class MessageCenterViewTest;
- void AddMessageViewAt(MessageView* view, int index);
- void AddGroupPlaceholder(const NotifierId& group_id,
- const Notification& notification,
- const gfx::ImageSkia& group_icon,
- int group_size,
- int index);
void AddNotificationAt(const Notification& notification, int index);
void NotificationsChanged();
void SetNotificationViewForTest(MessageView* view);
@@ -115,16 +106,11 @@ class MESSAGE_CENTER_EXPORT MessageCenterView : public views::View,
MessageCenter* message_center_; // Weak reference.
MessageCenterTray* tray_; // Weak reference.
- // Map notification_id->NotificationView*. It contains all NotificaitonViews
+ // Map notification_id->NotificationView*. It contains all NotificationViews
// currently displayed in MessageCenter.
typedef std::map<std::string, NotificationView*> NotificationViewsMap;
NotificationViewsMap notification_views_; // Weak.
- // List of all GroupViews. GroupView is responsible for multiple Notifications
- // from the same source.
- typedef std::list<GroupView*> GroupViews;
- GroupViews group_views_; // Weak.
-
// Child views.
views::ScrollView* scroller_;
scoped_ptr<MessageListView> message_list_view_;
@@ -151,6 +137,8 @@ class MESSAGE_CENTER_EXPORT MessageCenterView : public views::View,
// ignored.
bool is_closing_;
+ scoped_ptr<MessageViewContextMenuController> context_menu_controller_;
+
DISALLOW_COPY_AND_ASSIGN(MessageCenterView);
};