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

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

Issue 1961803002: Remove NoNotificationMessageView from empty message center (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 4 years, 7 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: ui/message_center/views/message_center_view.h
diff --git a/ui/message_center/views/message_center_view.h b/ui/message_center/views/message_center_view.h
index 37837261ffa184ce26c66feab49b7913e6b8d524..9a37ade9987b5ba9773f0264c67d9b650415a9d1 100644
--- a/ui/message_center/views/message_center_view.h
+++ b/ui/message_center/views/message_center_view.h
@@ -94,9 +94,13 @@ class MESSAGE_CENTER_EXPORT MessageCenterView : public views::View,
private:
friend class MessageCenterViewTest;
+ enum class Mode { NOTIFICATIONS, SETTINGS, BUTTONS_ONLY };
+
void AddNotificationAt(const Notification& notification, int index);
- void NotificationsChanged();
base::string16 GetButtonBarTitle() const;
+ void Update(bool animate);
+ void SetVisibilityMode(Mode mode, bool animate);
+ void UpdateButtonBarStatus();
void SetNotificationViewForTest(MessageView* view);
MessageCenter* message_center_; // Weak reference.
@@ -110,7 +114,6 @@ class MESSAGE_CENTER_EXPORT MessageCenterView : public views::View,
// Child views.
views::ScrollView* scroller_;
std::unique_ptr<MessageListView> message_list_view_;
- std::unique_ptr<views::View> empty_list_view_;
NotifierSettingsView* settings_view_;
MessageCenterButtonBar* button_bar_;
bool top_down_;
@@ -133,6 +136,11 @@ class MESSAGE_CENTER_EXPORT MessageCenterView : public views::View,
// ignored.
bool is_closing_;
+ bool is_clearing_ = false;
+
+ // Current view mode. During animation, it is the target mode.
+ Mode mode_ = Mode::BUTTONS_ONLY;
+
std::unique_ptr<MessageViewContextMenuController> context_menu_controller_;
DISALLOW_COPY_AND_ASSIGN(MessageCenterView);
« no previous file with comments | « ui/message_center/views/message_center_button_bar.cc ('k') | ui/message_center/views/message_center_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698