Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(687)

Side by Side Diff: ui/message_center/views/notification_header_view.h

Issue 2945303006: Add percentage of progress in notification header. (Closed)
Patch Set: Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 SetSummaryText(const base::string16& summary_text);
fukino 2017/06/22 08:57:43 optional nit: Instead of having a direct setter fo
tetsui 2017/06/23 02:33:04 Done.
25 void SetExpandButtonEnabled(bool enabled); 26 void SetExpandButtonEnabled(bool enabled);
26 void SetExpanded(bool expanded); 27 void SetExpanded(bool expanded);
27 void SetSettingsButtonEnabled(bool enabled); 28 void SetSettingsButtonEnabled(bool enabled);
28 void SetCloseButtonEnabled(bool enabled); 29 void SetCloseButtonEnabled(bool enabled);
29 void SetControlButtonsVisible(bool visible); 30 void SetControlButtonsVisible(bool visible);
30 bool IsExpandButtonEnabled(); 31 bool IsExpandButtonEnabled();
31 bool IsSettingsButtonEnabled(); 32 bool IsSettingsButtonEnabled();
32 bool IsCloseButtonEnabled(); 33 bool IsCloseButtonEnabled();
33 bool IsCloseButtonFocused(); 34 bool IsCloseButtonFocused();
34 35
35 views::ImageButton* expand_button() { return expand_button_; } 36 views::ImageButton* expand_button() { return expand_button_; }
36 views::ImageButton* settings_button() { return settings_button_; } 37 views::ImageButton* settings_button() { return settings_button_; }
37 views::ImageButton* close_button() { return close_button_; } 38 views::ImageButton* close_button() { return close_button_; }
38 39
39 private: 40 private:
40 void UpdateControlButtonsVisibility(); 41 void UpdateControlButtonsVisibility();
41 42
42 views::Label* app_name_view_ = nullptr; 43 views::Label* app_name_view_ = nullptr;
44 views::Label* summary_text_divider_ = nullptr;
45 views::Label* summary_text_view_ = nullptr;
43 views::ImageView* app_icon_view_ = nullptr; 46 views::ImageView* app_icon_view_ = nullptr;
44 views::ImageButton* expand_button_ = nullptr; 47 views::ImageButton* expand_button_ = nullptr;
45 PaddedButton* settings_button_ = nullptr; 48 PaddedButton* settings_button_ = nullptr;
46 PaddedButton* close_button_ = nullptr; 49 PaddedButton* close_button_ = nullptr;
47 50
48 bool settings_button_enabled_ = false; 51 bool settings_button_enabled_ = false;
49 bool close_button_enabled_ = false; 52 bool close_button_enabled_ = false;
50 bool is_control_buttons_visible_ = false; 53 bool is_control_buttons_visible_ = false;
51 54
52 DISALLOW_COPY_AND_ASSIGN(NotificationHeaderView); 55 DISALLOW_COPY_AND_ASSIGN(NotificationHeaderView);
53 }; 56 };
54 57
55 } // namespace message_center 58 } // namespace message_center
56 59
57 #endif // UI_MESSAGE_CENTER_VIEWS_NOTIFICATION_HEADER_VIEW_H_ 60 #endif // UI_MESSAGE_CENTER_VIEWS_NOTIFICATION_HEADER_VIEW_H_
OLDNEW
« no previous file with comments | « no previous file | ui/message_center/views/notification_header_view.cc » ('j') | ui/message_center/views/notification_view_md.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698