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

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

Issue 75133006: Move knowledge about MessageCenter out of MessageView. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: remover types 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/message_view.h
diff --git a/ui/message_center/views/message_view.h b/ui/message_center/views/message_view.h
index 8e39555ae0bf0b55d4b6e10a739c920ed108e410..961c050c56c4899a5a9d318938ab2c664c8edbd5 100644
--- a/ui/message_center/views/message_view.h
+++ b/ui/message_center/views/message_view.h
@@ -33,11 +33,15 @@ const int kWebNotificationIconSize = 40;
class MESSAGE_CENTER_EXPORT MessageView : public views::SlideOutView,
public views::ButtonListener {
public:
- MessageView(const Notification& notification,
- MessageCenter* message_center,
- MessageCenterTray* tray);
+ MessageView(const string16& display_source);
virtual ~MessageView();
+ // Overrided by derived classes.
+ virtual void ClickOnNotification() = 0;
+ virtual void RemoveNotification(bool by_user) = 0;
+ virtual void DisableNotificationsFromThisSource() = 0;
+ virtual void ShowNotifierSettingsBubble() = 0;
+
// Returns the insets for the shadow it will have for rich notification.
static gfx::Insets GetShadowInsets();
@@ -63,23 +67,16 @@ class MESSAGE_CENTER_EXPORT MessageView : public views::SlideOutView,
virtual void ButtonPressed(views::Button* sender,
const ui::Event& event) OVERRIDE;
- const std::string& notification_id() { return notification_id_; }
void set_scroller(views::ScrollView* scroller) { scroller_ = scroller; }
protected:
- MessageView();
-
// Overridden from views::SlideOutView:
virtual void OnSlideOut() OVERRIDE;
- MessageCenter* message_center() { return message_center_; }
views::ImageButton* close_button() { return close_button_.get(); }
views::ScrollView* scroller() { return scroller_; }
private:
- MessageCenter* message_center_; // Weak reference.
- std::string notification_id_;
-
scoped_ptr<MessageViewContextMenuController> context_menu_controller_;
scoped_ptr<views::ImageButton> close_button_;
views::ScrollView* scroller_;

Powered by Google App Engine
This is Rietveld 408576698