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

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

Issue 2966693002: Move overflow indicator to notifiction header. (Closed)
Patch Set: Resolve review comments. Created 3 years, 5 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
« no previous file with comments | « no previous file | ui/message_center/views/notification_header_view.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 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
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_
OLDNEW
« no previous file with comments | « no previous file | ui/message_center/views/notification_header_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698