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

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

Issue 2942143002: Add progress notification support to new-style notification. (Closed)
Patch Set: Resolve review comments. 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
« no previous file with comments | « no previous file | ui/message_center/views/notification_view_md.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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_VIEW_MD_H_ 5 #ifndef UI_MESSAGE_CENTER_VIEWS_NOTIFICATION_VIEW_MD_H_
6 #define UI_MESSAGE_CENTER_VIEWS_NOTIFICATION_VIEW_MD_H_ 6 #define UI_MESSAGE_CENTER_VIEWS_NOTIFICATION_VIEW_MD_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/gtest_prod_util.h" 10 #include "base/gtest_prod_util.h"
11 #include "base/macros.h" 11 #include "base/macros.h"
12 #include "ui/message_center/message_center_export.h" 12 #include "ui/message_center/message_center_export.h"
13 #include "ui/message_center/views/message_view.h" 13 #include "ui/message_center/views/message_view.h"
14 #include "ui/views/controls/button/button.h" 14 #include "ui/views/controls/button/button.h"
15 #include "ui/views/view_targeter_delegate.h" 15 #include "ui/views/view_targeter_delegate.h"
16 16
17 namespace views { 17 namespace views {
18 class Label; 18 class Label;
19 class LabelButton; 19 class LabelButton;
20 class ProgressBar;
20 } 21 }
21 22
22 namespace message_center { 23 namespace message_center {
23 24
24 class BoundedLabel; 25 class BoundedLabel;
25 class NotificationHeaderView; 26 class NotificationHeaderView;
26 class ProportionalImageView; 27 class ProportionalImageView;
27 28
29 namespace {
30 class CompactTitleMessageView;
31 }
32
28 // View that displays all current types of notification (web, basic, image, and 33 // View that displays all current types of notification (web, basic, image, and
29 // list) except the custom notification. Future notification types may be 34 // list) except the custom notification. Future notification types may be
30 // handled by other classes, in which case instances of those classes would be 35 // handled by other classes, in which case instances of those classes would be
31 // returned by the Create() factory method below. 36 // returned by the Create() factory method below.
32 class MESSAGE_CENTER_EXPORT NotificationViewMD 37 class MESSAGE_CENTER_EXPORT NotificationViewMD
33 : public MessageView, 38 : public MessageView,
34 public views::ButtonListener, 39 public views::ButtonListener,
35 public views::ViewTargeterDelegate { 40 public views::ViewTargeterDelegate {
36 public: 41 public:
37 NotificationViewMD(MessageCenterController* controller, 42 NotificationViewMD(MessageCenterController* controller,
(...skipping 18 matching lines...) Expand all
56 61
57 // views::ViewTargeterDelegate: 62 // views::ViewTargeterDelegate:
58 views::View* TargetForRect(views::View* root, const gfx::Rect& rect) override; 63 views::View* TargetForRect(views::View* root, const gfx::Rect& rect) override;
59 64
60 private: 65 private:
61 void CreateOrUpdateViews(const Notification& notification); 66 void CreateOrUpdateViews(const Notification& notification);
62 67
63 void CreateOrUpdateContextTitleView(const Notification& notification); 68 void CreateOrUpdateContextTitleView(const Notification& notification);
64 void CreateOrUpdateTitleView(const Notification& notification); 69 void CreateOrUpdateTitleView(const Notification& notification);
65 void CreateOrUpdateMessageView(const Notification& notification); 70 void CreateOrUpdateMessageView(const Notification& notification);
71 void CreateOrUpdateCompactTitleMessageView(const Notification& notification);
66 void CreateOrUpdateProgressBarView(const Notification& notification); 72 void CreateOrUpdateProgressBarView(const Notification& notification);
67 void CreateOrUpdateListItemViews(const Notification& notification); 73 void CreateOrUpdateListItemViews(const Notification& notification);
68 void CreateOrUpdateIconView(const Notification& notification); 74 void CreateOrUpdateIconView(const Notification& notification);
69 void CreateOrUpdateSmallIconView(const Notification& notification); 75 void CreateOrUpdateSmallIconView(const Notification& notification);
70 void CreateOrUpdateImageView(const Notification& notification); 76 void CreateOrUpdateImageView(const Notification& notification);
71 void CreateOrUpdateActionButtonViews(const Notification& notification); 77 void CreateOrUpdateActionButtonViews(const Notification& notification);
72 void CreateOrUpdateCloseButtonView(const Notification& notification); 78 void CreateOrUpdateCloseButtonView(const Notification& notification);
73 void CreateOrUpdateSettingsButtonView(const Notification& notification); 79 void CreateOrUpdateSettingsButtonView(const Notification& notification);
74 80
75 bool IsExpandable(); 81 bool IsExpandable();
(...skipping 16 matching lines...) Expand all
92 views::View* right_content_ = nullptr; 98 views::View* right_content_ = nullptr;
93 99
94 // Views which are dinamicallly created inside view hierarchy. 100 // Views which are dinamicallly created inside view hierarchy.
95 views::Label* title_view_ = nullptr; 101 views::Label* title_view_ = nullptr;
96 BoundedLabel* message_view_ = nullptr; 102 BoundedLabel* message_view_ = nullptr;
97 ProportionalImageView* icon_view_ = nullptr; 103 ProportionalImageView* icon_view_ = nullptr;
98 views::View* image_container_ = nullptr; 104 views::View* image_container_ = nullptr;
99 ProportionalImageView* image_view_ = nullptr; 105 ProportionalImageView* image_view_ = nullptr;
100 std::vector<views::LabelButton*> action_buttons_; 106 std::vector<views::LabelButton*> action_buttons_;
101 std::vector<views::View*> item_views_; 107 std::vector<views::View*> item_views_;
108 views::ProgressBar* progress_bar_view_ = nullptr;
109 CompactTitleMessageView* compact_title_message_view_ = nullptr;
102 110
103 DISALLOW_COPY_AND_ASSIGN(NotificationViewMD); 111 DISALLOW_COPY_AND_ASSIGN(NotificationViewMD);
104 }; 112 };
105 113
106 } // namespace message_center 114 } // namespace message_center
107 115
108 #endif // UI_MESSAGE_CENTER_VIEWS_NOTIFICATION_VIEW_MD_H_ 116 #endif // UI_MESSAGE_CENTER_VIEWS_NOTIFICATION_VIEW_MD_H_
OLDNEW
« no previous file with comments | « no previous file | ui/message_center/views/notification_view_md.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698