| 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 #include "ui/views/view.h" | 8 #include "ui/views/view.h" |
| 9 | 9 |
| 10 #include "ui/base/animation/animation_delegate.h" | 10 #include "ui/base/animation/animation_delegate.h" |
| 11 #include "ui/message_center/message_center_export.h" | 11 #include "ui/message_center/message_center_export.h" |
| 12 #include "ui/message_center/message_center_observer.h" | 12 #include "ui/message_center/message_center_observer.h" |
| 13 #include "ui/message_center/notification_list.h" | 13 #include "ui/message_center/notification_list.h" |
| 14 #include "ui/views/controls/button/button.h" |
| 14 | 15 |
| 15 namespace ui { | 16 namespace ui { |
| 16 class MultiAnimation; | 17 class MultiAnimation; |
| 17 } // namespace ui | 18 } // namespace ui |
| 18 | 19 |
| 19 namespace views { | 20 namespace views { |
| 20 class Button; | 21 class Button; |
| 21 } // namespace views | 22 } // namespace views |
| 22 | 23 |
| 23 namespace message_center { | 24 namespace message_center { |
| 24 | 25 |
| 25 class MessageCenter; | 26 class MessageCenter; |
| 26 class MessageCenterBubble; | 27 class MessageCenterBubble; |
| 28 class NotificationCenterButton; |
| 29 class MessageCenterButtonBar; |
| 27 class MessageCenterTray; | 30 class MessageCenterTray; |
| 28 class MessageCenterView; | 31 class MessageCenterView; |
| 29 class MessageView; | 32 class MessageView; |
| 30 class MessageListView; | 33 class MessageListView; |
| 31 class NotifierSettingsView; | 34 class NotifierSettingsView; |
| 32 | 35 |
| 33 // MessageCenterButtonBar ////////////////////////////////////////////////////// | |
| 34 | |
| 35 // If you know how to better hide this implementation class please do so, and | |
| 36 // otherwise please refrain from using it :-). | |
| 37 class MessageCenterButtonBar : public views::View { | |
| 38 public: | |
| 39 MessageCenterButtonBar(MessageCenterView* message_center_view, | |
| 40 MessageCenter* message_center); | |
| 41 virtual ~MessageCenterButtonBar(); | |
| 42 | |
| 43 virtual void SetAllButtonsEnabled(bool enabled); | |
| 44 | |
| 45 void SetCloseAllVisible(bool visible); | |
| 46 | |
| 47 protected: | |
| 48 MessageCenterView* message_center_view() const { | |
| 49 return message_center_view_; | |
| 50 } | |
| 51 MessageCenter* message_center() const { return message_center_; } | |
| 52 MessageCenterTray* tray() const { return tray_; } | |
| 53 views::Button* close_all_button() const { return close_all_button_; } | |
| 54 void set_close_all_button(views::Button* button) { | |
| 55 close_all_button_ = button; | |
| 56 } | |
| 57 | |
| 58 private: | |
| 59 MessageCenterView* message_center_view_; // Weak reference. | |
| 60 MessageCenter* message_center_; // Weak reference. | |
| 61 MessageCenterTray* tray_; // Weak reference. | |
| 62 views::Button* close_all_button_; | |
| 63 | |
| 64 DISALLOW_COPY_AND_ASSIGN(MessageCenterButtonBar); | |
| 65 }; | |
| 66 | |
| 67 // MessageCenterView /////////////////////////////////////////////////////////// | 36 // MessageCenterView /////////////////////////////////////////////////////////// |
| 68 | 37 |
| 69 class MESSAGE_CENTER_EXPORT MessageCenterView : public views::View, | 38 class MESSAGE_CENTER_EXPORT MessageCenterView : public views::View, |
| 70 public MessageCenterObserver, | 39 public MessageCenterObserver, |
| 71 public ui::AnimationDelegate { | 40 public ui::AnimationDelegate { |
| 72 public: | 41 public: |
| 73 MessageCenterView(MessageCenter* message_center, | 42 MessageCenterView(MessageCenter* message_center, |
| 74 MessageCenterTray* tray, | 43 MessageCenterTray* tray, |
| 75 int max_height, | 44 int max_height, |
| 76 bool initially_settings_visible); | 45 bool initially_settings_visible); |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 128 int source_height_; | 97 int source_height_; |
| 129 int target_height_; | 98 int target_height_; |
| 130 scoped_ptr<ui::MultiAnimation> settings_transition_animation_; | 99 scoped_ptr<ui::MultiAnimation> settings_transition_animation_; |
| 131 | 100 |
| 132 DISALLOW_COPY_AND_ASSIGN(MessageCenterView); | 101 DISALLOW_COPY_AND_ASSIGN(MessageCenterView); |
| 133 }; | 102 }; |
| 134 | 103 |
| 135 } // namespace message_center | 104 } // namespace message_center |
| 136 | 105 |
| 137 #endif // UI_MESSAGE_CENTER_VIEWS_MESSAGE_CENTER_VIEW_H_ | 106 #endif // UI_MESSAGE_CENTER_VIEWS_MESSAGE_CENTER_VIEW_H_ |
| OLD | NEW |