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

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: Added tests of "mode". 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 194754f448a7ebfb343f882f70865f1fbb3b213f..940719fa790dacc40c1d75f0a917668910476c2c 100644
--- a/ui/message_center/views/message_center_view.h
+++ b/ui/message_center/views/message_center_view.h
@@ -95,8 +95,12 @@ 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();
+ void Update(bool animate);
+ void SetVisibilityMode(Mode mode, bool animate);
+ void UpdateButtonsStatus();
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);

Powered by Google App Engine
This is Rietveld 408576698