OLD | NEW |
1 // Copyright 2017 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 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_NOTIFICATION_HEADER_VIEW_H_ | 5 #ifndef UI_MESSAGE_CENTER_VIEWS_NOTIFICATION_HEADER_VIEW_H_ |
6 #define UI_MESSAGE_CENTER_VIEWS_NOTIFICATION_HEADER_VIEW_H_ | 6 #define UI_MESSAGE_CENTER_VIEWS_NOTIFICATION_HEADER_VIEW_H_ |
7 | 7 |
8 #include "base/macros.h" | 8 #include "base/macros.h" |
9 #include "ui/message_center/views/padded_button.h" | 9 #include "ui/message_center/views/padded_button.h" |
10 #include "ui/views/controls/button/custom_button.h" | 10 #include "ui/views/controls/button/custom_button.h" |
(...skipping 16 matching lines...) Expand all Loading... |
27 void SetExpanded(bool expanded); | 27 void SetExpanded(bool expanded); |
28 void SetSettingsButtonEnabled(bool enabled); | 28 void SetSettingsButtonEnabled(bool enabled); |
29 void SetCloseButtonEnabled(bool enabled); | 29 void SetCloseButtonEnabled(bool enabled); |
30 void SetControlButtonsVisible(bool visible); | 30 void SetControlButtonsVisible(bool visible); |
31 void ClearProgress(); | 31 void ClearProgress(); |
32 bool IsExpandButtonEnabled(); | 32 bool IsExpandButtonEnabled(); |
33 bool IsSettingsButtonEnabled(); | 33 bool IsSettingsButtonEnabled(); |
34 bool IsCloseButtonEnabled(); | 34 bool IsCloseButtonEnabled(); |
35 bool IsCloseButtonFocused(); | 35 bool IsCloseButtonFocused(); |
36 | 36 |
| 37 // CustomButton override: |
| 38 std::unique_ptr<views::InkDrop> CreateInkDrop() override; |
| 39 std::unique_ptr<views::InkDropRipple> CreateInkDropRipple() const override; |
| 40 std::unique_ptr<views::InkDropHighlight> CreateInkDropHighlight() |
| 41 const override; |
| 42 |
37 views::ImageButton* expand_button() { return expand_button_; } | 43 views::ImageButton* expand_button() { return expand_button_; } |
38 views::ImageButton* settings_button() { return settings_button_; } | 44 views::ImageButton* settings_button() { return settings_button_; } |
39 views::ImageButton* close_button() { return close_button_; } | 45 views::ImageButton* close_button() { return close_button_; } |
40 | 46 |
41 private: | 47 private: |
42 void UpdateControlButtonsVisibility(); | 48 void UpdateControlButtonsVisibility(); |
43 void UpdateSummaryTextVisibility(); | 49 void UpdateSummaryTextVisibility(); |
44 | 50 |
45 views::Label* app_name_view_ = nullptr; | 51 views::Label* app_name_view_ = nullptr; |
46 views::Label* summary_text_divider_ = nullptr; | 52 views::Label* summary_text_divider_ = nullptr; |
47 views::Label* summary_text_view_ = nullptr; | 53 views::Label* summary_text_view_ = nullptr; |
48 views::ImageView* app_icon_view_ = nullptr; | 54 views::ImageView* app_icon_view_ = nullptr; |
49 views::ImageButton* expand_button_ = nullptr; | 55 views::ImageButton* expand_button_ = nullptr; |
50 PaddedButton* settings_button_ = nullptr; | 56 PaddedButton* settings_button_ = nullptr; |
51 PaddedButton* close_button_ = nullptr; | 57 PaddedButton* close_button_ = nullptr; |
52 | 58 |
53 bool settings_button_enabled_ = false; | 59 bool settings_button_enabled_ = false; |
54 bool close_button_enabled_ = false; | 60 bool close_button_enabled_ = false; |
55 bool is_control_buttons_visible_ = false; | 61 bool is_control_buttons_visible_ = false; |
56 bool has_summary_text_ = false; | 62 bool has_summary_text_ = false; |
57 | 63 |
58 DISALLOW_COPY_AND_ASSIGN(NotificationHeaderView); | 64 DISALLOW_COPY_AND_ASSIGN(NotificationHeaderView); |
59 }; | 65 }; |
60 | 66 |
61 } // namespace message_center | 67 } // namespace message_center |
62 | 68 |
63 #endif // UI_MESSAGE_CENTER_VIEWS_NOTIFICATION_HEADER_VIEW_H_ | 69 #endif // UI_MESSAGE_CENTER_VIEWS_NOTIFICATION_HEADER_VIEW_H_ |
OLD | NEW |