Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 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 | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef UI_MESSAGE_CENTER_VIEWS_MESSAGE_CENTER_BUTTON_BAR_H_ | |
| 6 #define UI_MESSAGE_CENTER_VIEWS_MESSAGE_CENTER_BUTTON_BAR_H_ | |
| 7 | |
| 8 #include "ui/views/controls/button/button.h" | |
| 9 #include "ui/views/view.h" | |
| 10 | |
| 11 namespace views { | |
| 12 class Label; | |
| 13 } | |
| 14 | |
| 15 namespace message_center { | |
| 16 | |
| 17 class MessageCenter; | |
| 18 class MessageCenterTray; | |
| 19 class MessageCenterView; | |
| 20 class NotifierSettingsProvider; | |
| 21 class NotificationCenterButton; | |
| 22 class ButtonBarSettingsLabel; | |
|
jianli
2013/08/05 20:48:03
nit: Ordering.
dewittj
2013/08/05 22:42:28
Done.
| |
| 23 | |
| 24 // MessageCenterButtonBar is the class that shows the content outside the main | |
| 25 // notification area - the label (or NotifierGroup switcher) and the buttons. | |
| 26 class MessageCenterButtonBar : public views::View, | |
| 27 public views::ButtonListener { | |
| 28 public: | |
| 29 MessageCenterButtonBar(MessageCenterView* message_center_view, | |
| 30 MessageCenter* message_center, | |
| 31 NotifierSettingsProvider* notifier_settings_provider, | |
| 32 bool settings_initially_visible); | |
| 33 virtual ~MessageCenterButtonBar(); | |
| 34 | |
| 35 // Enables or disables all of the buttons in the center. This is used to | |
| 36 // prevent user clicks during the close-all animation. | |
| 37 virtual void SetAllButtonsEnabled(bool enabled); | |
| 38 | |
| 39 // Sometimes we shouldn't see the close-all button. | |
| 40 void SetCloseAllVisible(bool visible); | |
|
jianli
2013/08/05 20:48:03
Probably better to name it as SetCloseAllButtonVis
dewittj
2013/08/05 22:42:28
Done.
| |
| 41 | |
| 42 private: | |
| 43 // Overridden from views::View: | |
| 44 virtual void ChildVisibilityChanged(views::View* child) OVERRIDE; | |
| 45 | |
| 46 // Overridden from views::ButtonListener: | |
| 47 virtual void ButtonPressed(views::Button* sender, | |
| 48 const ui::Event& event) OVERRIDE; | |
| 49 | |
| 50 MessageCenterView* message_center_view() const { | |
| 51 return message_center_view_; | |
| 52 } | |
| 53 MessageCenter* message_center() const { return message_center_; } | |
| 54 views::Button* close_all_button() const { return close_all_button_; } | |
| 55 | |
| 56 MessageCenterView* message_center_view_; // Weak reference. | |
| 57 MessageCenter* message_center_; // Weak reference. | |
| 58 | |
| 59 // Sub-views of the button bar. | |
| 60 ButtonBarSettingsLabel* center_settings_label_; | |
|
jianli
2013/08/05 20:48:03
It seems that center_settings_label_ is not used.
dewittj
2013/08/05 22:42:28
Done.
| |
| 61 views::Button* close_all_button_; | |
| 62 NotificationCenterButton* settings_button_; | |
| 63 NotificationCenterButton* quiet_mode_button_; | |
| 64 | |
| 65 DISALLOW_COPY_AND_ASSIGN(MessageCenterButtonBar); | |
| 66 }; | |
| 67 | |
| 68 } // namespace message_center | |
| 69 | |
| 70 #endif // UI_MESSAGE_CENTER_VIEWS_MESSAGE_CENTER_BUTTON_BAR_H_ | |
| OLD | NEW |