OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef UI_MESSAGE_CENTER_VIEWS_MESSAGE_CENTER_VIEW_H_ | 5 #ifndef UI_MESSAGE_CENTER_VIEWS_MESSAGE_CENTER_VIEW_H_ |
6 #define UI_MESSAGE_CENTER_VIEWS_MESSAGE_CENTER_VIEW_H_ | 6 #define UI_MESSAGE_CENTER_VIEWS_MESSAGE_CENTER_VIEW_H_ |
7 | 7 |
8 | 8 |
9 #include "ui/gfx/animation/animation_delegate.h" | 9 #include "ui/gfx/animation/animation_delegate.h" |
10 #include "ui/message_center/message_center_export.h" | 10 #include "ui/message_center/message_center_export.h" |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
61 | 61 |
62 void SetSettingsVisible(bool visible); | 62 void SetSettingsVisible(bool visible); |
63 void OnSettingsChanged(); | 63 void OnSettingsChanged(); |
64 bool settings_visible() const { return settings_visible_; } | 64 bool settings_visible() const { return settings_visible_; } |
65 MessageCenterTray* tray() { return tray_; } | 65 MessageCenterTray* tray() { return tray_; } |
66 | 66 |
67 void SetIsClosing(bool is_closing); | 67 void SetIsClosing(bool is_closing); |
68 | 68 |
69 protected: | 69 protected: |
70 // Overridden from views::View: | 70 // Overridden from views::View: |
71 virtual void Layout() OVERRIDE; | 71 virtual void Layout() override; |
72 virtual gfx::Size GetPreferredSize() const OVERRIDE; | 72 virtual gfx::Size GetPreferredSize() const override; |
73 virtual int GetHeightForWidth(int width) const OVERRIDE; | 73 virtual int GetHeightForWidth(int width) const override; |
74 virtual bool OnMouseWheel(const ui::MouseWheelEvent& event) OVERRIDE; | 74 virtual bool OnMouseWheel(const ui::MouseWheelEvent& event) override; |
75 virtual void OnMouseExited(const ui::MouseEvent& event) OVERRIDE; | 75 virtual void OnMouseExited(const ui::MouseEvent& event) override; |
76 | 76 |
77 // Overridden from MessageCenterObserver: | 77 // Overridden from MessageCenterObserver: |
78 virtual void OnNotificationAdded(const std::string& id) OVERRIDE; | 78 virtual void OnNotificationAdded(const std::string& id) override; |
79 virtual void OnNotificationRemoved(const std::string& id, | 79 virtual void OnNotificationRemoved(const std::string& id, |
80 bool by_user) OVERRIDE; | 80 bool by_user) override; |
81 virtual void OnNotificationUpdated(const std::string& id) OVERRIDE; | 81 virtual void OnNotificationUpdated(const std::string& id) override; |
82 | 82 |
83 // Overridden from MessageCenterController: | 83 // Overridden from MessageCenterController: |
84 virtual void ClickOnNotification(const std::string& notification_id) OVERRIDE; | 84 virtual void ClickOnNotification(const std::string& notification_id) override; |
85 virtual void RemoveNotification(const std::string& notification_id, | 85 virtual void RemoveNotification(const std::string& notification_id, |
86 bool by_user) OVERRIDE; | 86 bool by_user) override; |
87 virtual scoped_ptr<ui::MenuModel> CreateMenuModel( | 87 virtual scoped_ptr<ui::MenuModel> CreateMenuModel( |
88 const NotifierId& notifier_id, | 88 const NotifierId& notifier_id, |
89 const base::string16& display_source) OVERRIDE; | 89 const base::string16& display_source) override; |
90 virtual bool HasClickedListener(const std::string& notification_id) OVERRIDE; | 90 virtual bool HasClickedListener(const std::string& notification_id) override; |
91 virtual void ClickOnNotificationButton(const std::string& notification_id, | 91 virtual void ClickOnNotificationButton(const std::string& notification_id, |
92 int button_index) OVERRIDE; | 92 int button_index) override; |
93 | 93 |
94 // Overridden from gfx::AnimationDelegate: | 94 // Overridden from gfx::AnimationDelegate: |
95 virtual void AnimationEnded(const gfx::Animation* animation) OVERRIDE; | 95 virtual void AnimationEnded(const gfx::Animation* animation) override; |
96 virtual void AnimationProgressed(const gfx::Animation* animation) OVERRIDE; | 96 virtual void AnimationProgressed(const gfx::Animation* animation) override; |
97 virtual void AnimationCanceled(const gfx::Animation* animation) OVERRIDE; | 97 virtual void AnimationCanceled(const gfx::Animation* animation) override; |
98 | 98 |
99 private: | 99 private: |
100 friend class MessageCenterViewTest; | 100 friend class MessageCenterViewTest; |
101 | 101 |
102 void AddNotificationAt(const Notification& notification, int index); | 102 void AddNotificationAt(const Notification& notification, int index); |
103 void NotificationsChanged(); | 103 void NotificationsChanged(); |
104 void SetNotificationViewForTest(MessageView* view); | 104 void SetNotificationViewForTest(MessageView* view); |
105 | 105 |
106 MessageCenter* message_center_; // Weak reference. | 106 MessageCenter* message_center_; // Weak reference. |
107 MessageCenterTray* tray_; // Weak reference. | 107 MessageCenterTray* tray_; // Weak reference. |
(...skipping 30 matching lines...) Expand all Loading... |
138 bool is_closing_; | 138 bool is_closing_; |
139 | 139 |
140 scoped_ptr<MessageViewContextMenuController> context_menu_controller_; | 140 scoped_ptr<MessageViewContextMenuController> context_menu_controller_; |
141 | 141 |
142 DISALLOW_COPY_AND_ASSIGN(MessageCenterView); | 142 DISALLOW_COPY_AND_ASSIGN(MessageCenterView); |
143 }; | 143 }; |
144 | 144 |
145 } // namespace message_center | 145 } // namespace message_center |
146 | 146 |
147 #endif // UI_MESSAGE_CENTER_VIEWS_MESSAGE_CENTER_VIEW_H_ | 147 #endif // UI_MESSAGE_CENTER_VIEWS_MESSAGE_CENTER_VIEW_H_ |
OLD | NEW |