| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 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_BUTTON_BAR_H_ | 5 #ifndef UI_MESSAGE_CENTER_VIEWS_MESSAGE_CENTER_BUTTON_BAR_H_ |
| 6 #define UI_MESSAGE_CENTER_VIEWS_MESSAGE_CENTER_BUTTON_BAR_H_ | 6 #define UI_MESSAGE_CENTER_VIEWS_MESSAGE_CENTER_BUTTON_BAR_H_ |
| 7 | 7 |
| 8 #include "base/macros.h" | 8 #include "base/macros.h" |
| 9 #include "build/build_config.h" | 9 #include "build/build_config.h" |
| 10 #include "ui/message_center/message_center_export.h" | 10 #include "ui/message_center/message_center_export.h" |
| (...skipping 25 matching lines...) Expand all Loading... |
| 36 ~MessageCenterButtonBar() override; | 36 ~MessageCenterButtonBar() override; |
| 37 | 37 |
| 38 // Enables or disables all of the buttons in the center. This is used to | 38 // Enables or disables all of the buttons in the center. This is used to |
| 39 // prevent user clicks during the close-all animation. | 39 // prevent user clicks during the close-all animation. |
| 40 void SetSettingsAndQuietModeButtonsEnabled(bool enabled); | 40 void SetSettingsAndQuietModeButtonsEnabled(bool enabled); |
| 41 | 41 |
| 42 // Sometimes we shouldn't see the close-all button. | 42 // Sometimes we shouldn't see the close-all button. |
| 43 void SetCloseAllButtonEnabled(bool enabled); | 43 void SetCloseAllButtonEnabled(bool enabled); |
| 44 | 44 |
| 45 MESSAGE_CENTER_EXPORT views::Button* GetCloseAllButtonForTest() const; | 45 MESSAGE_CENTER_EXPORT views::Button* GetCloseAllButtonForTest() const; |
| 46 MESSAGE_CENTER_EXPORT views::Button* GetSettingsButtonForTest() const; |
| 47 MESSAGE_CENTER_EXPORT views::Button* GetQuietModeButtonForTest() const; |
| 46 | 48 |
| 47 // Sometimes we shouldn't see the back arrow (not in settings). | 49 // Sometimes we shouldn't see the back arrow (not in settings). |
| 48 void SetBackArrowVisible(bool visible); | 50 void SetBackArrowVisible(bool visible); |
| 49 | 51 |
| 50 // Update the label of the title. | 52 // Update the label of the title. |
| 51 void SetTitle(const base::string16& title); | 53 void SetTitle(const base::string16& title); |
| 52 | 54 |
| 55 void SetButtonsVisible(bool visible); |
| 56 |
| 53 private: | 57 private: |
| 54 // Updates the layout manager which can have differing configuration | 58 // Updates the layout manager which can have differing configuration |
| 55 // depending on the visibility of different parts of the button bar. | 59 // depending on the visibility of different parts of the button bar. |
| 56 void ViewVisibilityChanged(); | 60 void ViewVisibilityChanged(); |
| 57 | 61 |
| 58 // Overridden from views::View: | 62 // Overridden from views::View: |
| 59 void ChildVisibilityChanged(views::View* child) override; | 63 void ChildVisibilityChanged(views::View* child) override; |
| 60 | 64 |
| 61 // Overridden from views::ButtonListener: | 65 // Overridden from views::ButtonListener: |
| 62 void ButtonPressed(views::Button* sender, const ui::Event& event) override; | 66 void ButtonPressed(views::Button* sender, const ui::Event& event) override; |
| (...skipping 22 matching lines...) Expand all Loading... |
| 85 NotificationCenterButton* close_all_button_; | 89 NotificationCenterButton* close_all_button_; |
| 86 NotificationCenterButton* settings_button_; | 90 NotificationCenterButton* settings_button_; |
| 87 NotificationCenterButton* quiet_mode_button_; | 91 NotificationCenterButton* quiet_mode_button_; |
| 88 | 92 |
| 89 DISALLOW_COPY_AND_ASSIGN(MessageCenterButtonBar); | 93 DISALLOW_COPY_AND_ASSIGN(MessageCenterButtonBar); |
| 90 }; | 94 }; |
| 91 | 95 |
| 92 } // namespace message_center | 96 } // namespace message_center |
| 93 | 97 |
| 94 #endif // UI_MESSAGE_CENTER_VIEWS_MESSAGE_CENTER_BUTTON_BAR_H_ | 98 #endif // UI_MESSAGE_CENTER_VIEWS_MESSAGE_CENTER_BUTTON_BAR_H_ |
| OLD | NEW |