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

Unified Diff: ui/message_center/views/notification_view.h

Issue 75133006: Move knowledge about MessageCenter out of MessageView. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix win build break Created 7 years, 1 month 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: ui/message_center/views/notification_view.h
diff --git a/ui/message_center/views/notification_view.h b/ui/message_center/views/notification_view.h
index c27037b0cfd67819f2d0a5280d404f0469a06484..69529ed972ee3e84cff7ed7a10e6e93e9a964321 100644
--- a/ui/message_center/views/notification_view.h
+++ b/ui/message_center/views/notification_view.h
@@ -53,12 +53,21 @@ class MESSAGE_CENTER_EXPORT NotificationView : public MessageView {
virtual void ButtonPressed(views::Button* sender,
const ui::Event& event) OVERRIDE;
+ std::string notification_id() { return notification_id_; }
+
protected:
NotificationView(const Notification& notification,
MessageCenter* message_center,
MessageCenterTray* tray,
bool expanded);
+ // Overrides from base class MessageView:
+ virtual MessageViewTypes GetType() OVERRIDE;
+ virtual void ClickOnNotification() OVERRIDE;
+ virtual void RemoveNotification(bool by_user) OVERRIDE;
+ virtual void DisableNotificationsFromThisSource() OVERRIDE;
+ virtual void ShowNotifierSettingsBubble() OVERRIDE;
+
private:
bool IsExpansionNeeded(int width);
bool IsMessageExpansionNeeded(int width);
@@ -66,6 +75,11 @@ class MESSAGE_CENTER_EXPORT NotificationView : public MessageView {
int GetMessageLines(int width, int limit);
int GetMessageHeight(int width, int limit);
+ MessageCenter* message_center_; // Weak.
+ MessageCenterTray* tray_; // Weak.
+ std::string notification_id_;
+ message_center::NotifierId notifier_id_;
+
// Describes whether the view should display a hand pointer or not.
bool clickable_;
bool is_expanded_;

Powered by Google App Engine
This is Rietveld 408576698