| OLD | NEW |
| (Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef UI_MESSAGE_CENTER_VIEWS_NOTIFICATION_HEADER_VIEW_H_ |
| 6 #define UI_MESSAGE_CENTER_VIEWS_NOTIFICATION_HEADER_VIEW_H_ |
| 7 |
| 8 #include "base/macros.h" |
| 9 #include "ui/message_center/views/padded_button.h" |
| 10 #include "ui/views/controls/button/custom_button.h" |
| 11 |
| 12 namespace views { |
| 13 class ImageButton; |
| 14 class ImageView; |
| 15 class Label; |
| 16 } |
| 17 |
| 18 namespace message_center { |
| 19 |
| 20 class NotificationHeaderView : public views::CustomButton { |
| 21 public: |
| 22 NotificationHeaderView(views::ButtonListener* listener); |
| 23 void SetAppIcon(const gfx::ImageSkia& img); |
| 24 void SetAppName(const base::string16& name); |
| 25 void SetExpandButtonEnabled(bool enabled); |
| 26 void SetExpanded(bool expanded); |
| 27 void SetSettingsButtonEnabled(bool enabled); |
| 28 void SetCloseButtonEnabled(bool enabled); |
| 29 void SetControlButtonsVisible(bool visible); |
| 30 bool IsExpandButtonEnabled(); |
| 31 bool IsSettingsButtonEnabled(); |
| 32 bool IsCloseButtonEnabled(); |
| 33 bool IsCloseButtonFocused(); |
| 34 |
| 35 views::ImageButton* expand_button() { return expand_button_; } |
| 36 views::ImageButton* settings_button() { return settings_button_; } |
| 37 views::ImageButton* close_button() { return close_button_; } |
| 38 |
| 39 private: |
| 40 void UpdateControlButtonsVisibility(); |
| 41 |
| 42 views::Label* app_name_view_ = nullptr; |
| 43 views::ImageView* app_icon_view_ = nullptr; |
| 44 views::ImageButton* expand_button_ = nullptr; |
| 45 PaddedButton* settings_button_ = nullptr; |
| 46 PaddedButton* close_button_ = nullptr; |
| 47 |
| 48 bool settings_button_enabled_ = false; |
| 49 bool close_button_enabled_ = false; |
| 50 bool is_control_buttons_visible_ = false; |
| 51 |
| 52 DISALLOW_COPY_AND_ASSIGN(NotificationHeaderView); |
| 53 }; |
| 54 |
| 55 } // namespace message_center |
| 56 |
| 57 #endif // UI_MESSAGE_CENTER_VIEWS_NOTIFICATION_HEADER_VIEW_H_ |
| OLD | NEW |