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

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

Issue 1979583003: Support notifications with custom content (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@messageview-close-button
Patch Set: Created 4 years, 7 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 (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_H_ 5 #ifndef UI_MESSAGE_CENTER_VIEWS_NOTIFICATION_VIEW_H_
6 #define UI_MESSAGE_CENTER_VIEWS_NOTIFICATION_VIEW_H_ 6 #define UI_MESSAGE_CENTER_VIEWS_NOTIFICATION_VIEW_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"
(...skipping 12 matching lines...) Expand all
23 23
24 class BoundedLabel; 24 class BoundedLabel;
25 class MessageCenter; 25 class MessageCenter;
26 class NotificationButton; 26 class NotificationButton;
27 class NotificationProgressBarBase; 27 class NotificationProgressBarBase;
28 class NotificationView; 28 class NotificationView;
29 class PaddedButton; 29 class PaddedButton;
30 class ProportionalImageView; 30 class ProportionalImageView;
31 31
32 // View that displays all current types of notification (web, basic, image, and 32 // View that displays all current types of notification (web, basic, image, and
33 // list). Future notification types may be handled by other classes, in which 33 // list) except the custom notification. Future notification types may be
34 // case instances of those classes would be returned by the Create() factory 34 // handled by other classes, in which case instances of those classes would be
35 // method below. 35 // returned by the Create() factory method below.
36 class MESSAGE_CENTER_EXPORT NotificationView 36 class MESSAGE_CENTER_EXPORT NotificationView
37 : public MessageView, 37 : public MessageView,
38 public views::ViewTargeterDelegate { 38 public views::ViewTargeterDelegate {
39 public: 39 public:
40 // Creates appropriate MessageViews for notifications. Those currently are 40 // Creates appropriate MessageViews for notifications depending on the
41 // always NotificationView instances but in the future
42 // may be instances of other classes, with the class depending on the
43 // notification type. A notification is top level if it needs to be rendered 41 // notification type. A notification is top level if it needs to be rendered
44 // outside the browser window. No custom shadows are created for top level 42 // outside the browser window. No custom shadows are created for top level
45 // notifications on Linux with Aura. 43 // notifications on Linux with Aura.
46 // |controller| may be NULL, but has to be set before the view is shown. 44 // |controller| may be NULL, but has to be set before the view is shown.
47 static MessageView* Create(MessageCenterController* controller, 45 static MessageView* Create(MessageCenterController* controller,
48 const Notification& notification, 46 const Notification& notification,
49 bool top_level); 47 bool top_level);
50 ~NotificationView() override; 48 ~NotificationView() override;
51 49
52 // Overridden from views::View: 50 // Overridden from views::View:
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
121 NotificationProgressBarBase* progress_bar_view_ = nullptr; 119 NotificationProgressBarBase* progress_bar_view_ = nullptr;
122 std::vector<NotificationButton*> action_buttons_; 120 std::vector<NotificationButton*> action_buttons_;
123 std::vector<views::View*> separators_; 121 std::vector<views::View*> separators_;
124 122
125 DISALLOW_COPY_AND_ASSIGN(NotificationView); 123 DISALLOW_COPY_AND_ASSIGN(NotificationView);
126 }; 124 };
127 125
128 } // namespace message_center 126 } // namespace message_center
129 127
130 #endif // UI_MESSAGE_CENTER_VIEWS_NOTIFICATION_VIEW_H_ 128 #endif // UI_MESSAGE_CENTER_VIEWS_NOTIFICATION_VIEW_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698