| 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" |
| 11 | 11 |
| 12 namespace views { | 12 namespace views { |
| 13 class ImageButton; | 13 class ImageButton; |
| 14 class ImageView; | 14 class ImageView; |
| 15 class Label; | 15 class Label; |
| 16 } | 16 } |
| 17 | 17 |
| 18 namespace message_center { | 18 namespace message_center { |
| 19 | 19 |
| 20 class NotificationHeaderView : public views::CustomButton { | 20 class NotificationHeaderView : public views::CustomButton { |
| 21 public: | 21 public: |
| 22 NotificationHeaderView(views::ButtonListener* listener); | 22 NotificationHeaderView(views::ButtonListener* listener); |
| 23 void SetAppIcon(const gfx::ImageSkia& img); | 23 void SetAppIcon(const gfx::ImageSkia& img); |
| 24 void SetAppName(const base::string16& name); | 24 void SetAppName(const base::string16& name); |
| 25 void SetProgress(int progress); | 25 void SetProgress(int progress); |
| 26 void SetOverflowIndicator(int count); |
| 26 void SetExpandButtonEnabled(bool enabled); | 27 void SetExpandButtonEnabled(bool enabled); |
| 27 void SetExpanded(bool expanded); | 28 void SetExpanded(bool expanded); |
| 28 void SetSettingsButtonEnabled(bool enabled); | 29 void SetSettingsButtonEnabled(bool enabled); |
| 29 void SetCloseButtonEnabled(bool enabled); | 30 void SetCloseButtonEnabled(bool enabled); |
| 30 void SetControlButtonsVisible(bool visible); | 31 void SetControlButtonsVisible(bool visible); |
| 31 void ClearProgress(); | 32 void ClearProgress(); |
| 33 void ClearOverflowIndicator(); |
| 32 bool IsExpandButtonEnabled(); | 34 bool IsExpandButtonEnabled(); |
| 33 bool IsSettingsButtonEnabled(); | 35 bool IsSettingsButtonEnabled(); |
| 34 bool IsCloseButtonEnabled(); | 36 bool IsCloseButtonEnabled(); |
| 35 bool IsCloseButtonFocused(); | 37 bool IsCloseButtonFocused(); |
| 36 | 38 |
| 37 // CustomButton override: | 39 // CustomButton override: |
| 38 std::unique_ptr<views::InkDrop> CreateInkDrop() override; | 40 std::unique_ptr<views::InkDrop> CreateInkDrop() override; |
| 39 std::unique_ptr<views::InkDropRipple> CreateInkDropRipple() const override; | 41 std::unique_ptr<views::InkDropRipple> CreateInkDropRipple() const override; |
| 40 std::unique_ptr<views::InkDropHighlight> CreateInkDropHighlight() | 42 std::unique_ptr<views::InkDropHighlight> CreateInkDropHighlight() |
| 41 const override; | 43 const override; |
| (...skipping 10 matching lines...) Expand all Loading... |
| 52 views::Label* summary_text_divider_ = nullptr; | 54 views::Label* summary_text_divider_ = nullptr; |
| 53 views::Label* summary_text_view_ = nullptr; | 55 views::Label* summary_text_view_ = nullptr; |
| 54 views::ImageView* app_icon_view_ = nullptr; | 56 views::ImageView* app_icon_view_ = nullptr; |
| 55 views::ImageButton* expand_button_ = nullptr; | 57 views::ImageButton* expand_button_ = nullptr; |
| 56 PaddedButton* settings_button_ = nullptr; | 58 PaddedButton* settings_button_ = nullptr; |
| 57 PaddedButton* close_button_ = nullptr; | 59 PaddedButton* close_button_ = nullptr; |
| 58 | 60 |
| 59 bool settings_button_enabled_ = false; | 61 bool settings_button_enabled_ = false; |
| 60 bool close_button_enabled_ = false; | 62 bool close_button_enabled_ = false; |
| 61 bool is_control_buttons_visible_ = false; | 63 bool is_control_buttons_visible_ = false; |
| 62 bool has_summary_text_ = false; | 64 bool has_progress_ = false; |
| 65 bool has_overflow_indicator_ = false; |
| 63 | 66 |
| 64 DISALLOW_COPY_AND_ASSIGN(NotificationHeaderView); | 67 DISALLOW_COPY_AND_ASSIGN(NotificationHeaderView); |
| 65 }; | 68 }; |
| 66 | 69 |
| 67 } // namespace message_center | 70 } // namespace message_center |
| 68 | 71 |
| 69 #endif // UI_MESSAGE_CENTER_VIEWS_NOTIFICATION_HEADER_VIEW_H_ | 72 #endif // UI_MESSAGE_CENTER_VIEWS_NOTIFICATION_HEADER_VIEW_H_ |
| OLD | NEW |