Chromium Code Reviews| 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/views/controls/button/button.h" | 11 #include "ui/views/controls/button/button.h" |
| 11 #include "ui/views/controls/button/image_button.h" | 12 #include "ui/views/controls/button/image_button.h" |
| 12 #include "ui/views/view.h" | 13 #include "ui/views/view.h" |
| 13 | 14 |
| 14 namespace views { | 15 namespace views { |
| 15 class Label; | 16 class Label; |
| 16 } | 17 } |
| 17 | 18 |
| 18 namespace message_center { | 19 namespace message_center { |
| 19 | 20 |
| (...skipping 16 matching lines...) Expand all Loading... | |
| 36 const base::string16& title); | 37 const base::string16& title); |
| 37 ~MessageCenterButtonBar() override; | 38 ~MessageCenterButtonBar() override; |
| 38 | 39 |
| 39 // Enables or disables all of the buttons in the center. This is used to | 40 // Enables or disables all of the buttons in the center. This is used to |
| 40 // prevent user clicks during the close-all animation. | 41 // prevent user clicks during the close-all animation. |
| 41 virtual void SetAllButtonsEnabled(bool enabled); | 42 virtual void SetAllButtonsEnabled(bool enabled); |
| 42 | 43 |
| 43 // Sometimes we shouldn't see the close-all button. | 44 // Sometimes we shouldn't see the close-all button. |
| 44 void SetCloseAllButtonEnabled(bool enabled); | 45 void SetCloseAllButtonEnabled(bool enabled); |
| 45 | 46 |
| 47 MESSAGE_CENTER_EXPORT views::Button* GetCloseAllButtonForTest() const; | |
| 48 | |
| 46 // Sometimes we shouldn't see the back arrow (not in settings). | 49 // Sometimes we shouldn't see the back arrow (not in settings). |
| 47 void SetBackArrowVisible(bool visible); | 50 void SetBackArrowVisible(bool visible); |
| 48 | 51 |
| 49 private: | 52 private: |
| 53 FRIEND_TEST_ALL_PREFIXES(MessageCenterViewTest, CloseButton); | |
|
dewittj
2016/02/03 19:31:37
Why do you need this if you have the ForTest() met
yoshiki
2016/02/07 17:49:41
Done.
| |
| 54 | |
| 50 // Updates the layout manager which can have differing configuration | 55 // Updates the layout manager which can have differing configuration |
| 51 // depending on the visibility of different parts of the button bar. | 56 // depending on the visibility of different parts of the button bar. |
| 52 void ViewVisibilityChanged(); | 57 void ViewVisibilityChanged(); |
| 53 | 58 |
| 54 // Overridden from views::View: | 59 // Overridden from views::View: |
| 55 void ChildVisibilityChanged(views::View* child) override; | 60 void ChildVisibilityChanged(views::View* child) override; |
| 56 | 61 |
| 57 // Overridden from views::ButtonListener: | 62 // Overridden from views::ButtonListener: |
| 58 void ButtonPressed(views::Button* sender, const ui::Event& event) override; | 63 void ButtonPressed(views::Button* sender, const ui::Event& event) override; |
| 59 | 64 |
| (...skipping 21 matching lines...) Expand all Loading... | |
| 81 NotificationCenterButton* close_all_button_; | 86 NotificationCenterButton* close_all_button_; |
| 82 NotificationCenterButton* settings_button_; | 87 NotificationCenterButton* settings_button_; |
| 83 NotificationCenterButton* quiet_mode_button_; | 88 NotificationCenterButton* quiet_mode_button_; |
| 84 | 89 |
| 85 DISALLOW_COPY_AND_ASSIGN(MessageCenterButtonBar); | 90 DISALLOW_COPY_AND_ASSIGN(MessageCenterButtonBar); |
| 86 }; | 91 }; |
| 87 | 92 |
| 88 } // namespace message_center | 93 } // namespace message_center |
| 89 | 94 |
| 90 #endif // UI_MESSAGE_CENTER_VIEWS_MESSAGE_CENTER_BUTTON_BAR_H_ | 95 #endif // UI_MESSAGE_CENTER_VIEWS_MESSAGE_CENTER_BUTTON_BAR_H_ |
| OLD | NEW |