Chromium Code Reviews| OLD | NEW |
|---|---|
| 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" |
| 11 #include "ui/message_center/message_center_export.h" | 11 #include "ui/message_center/message_center_export.h" |
| 12 #include "ui/message_center/views/message_view.h" | 12 #include "ui/message_center/views/message_view.h" |
| 13 #include "ui/views/view_targeter_delegate.h" | 13 #include "ui/views/view_targeter_delegate.h" |
| 14 | 14 |
| 15 class GURL; | 15 class GURL; |
| 16 | 16 |
| 17 namespace views { | 17 namespace views { |
| 18 class ProgressBar; | 18 class ProgressBar; |
| 19 } | 19 } |
| 20 | 20 |
| 21 namespace message_center { | 21 namespace message_center { |
| 22 | 22 |
| 23 class BoundedLabel; | 23 class BoundedLabel; |
| 24 class MessageCenter; | 24 class MessageCenter; |
| 25 class MessageCenterController; | 25 class MessageCenterController; |
| 26 class NotificationButton; | 26 class NotificationButton; |
| 27 class NotificationProgressBar; | |
| 28 class NotificationIndeterminateProgressBar; | |
| 27 class NotificationView; | 29 class NotificationView; |
| 28 class PaddedButton; | 30 class PaddedButton; |
| 29 class ProportionalImageView; | 31 class ProportionalImageView; |
| 30 | 32 |
| 31 // 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 |
| 32 // list). Future notification types may be handled by other classes, in which | 34 // list). Future notification types may be handled by other classes, in which |
| 33 // case instances of those classes would be returned by the Create() factory | 35 // case instances of those classes would be returned by the Create() factory |
| 34 // method below. | 36 // method below. |
| 35 class MESSAGE_CENTER_EXPORT NotificationView | 37 class MESSAGE_CENTER_EXPORT NotificationView |
| 36 : public MessageView, | 38 : public MessageView, |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 92 views::View* TargetForRect(views::View* root, const gfx::Rect& rect) override; | 94 views::View* TargetForRect(views::View* root, const gfx::Rect& rect) override; |
| 93 | 95 |
| 94 void CreateOrUpdateViews(const Notification& notification); | 96 void CreateOrUpdateViews(const Notification& notification); |
| 95 void SetAccessibleName(const Notification& notification); | 97 void SetAccessibleName(const Notification& notification); |
| 96 | 98 |
| 97 void CreateOrUpdateTitleView(const Notification& notification); | 99 void CreateOrUpdateTitleView(const Notification& notification); |
| 98 void CreateOrUpdateMessageView(const Notification& notification); | 100 void CreateOrUpdateMessageView(const Notification& notification); |
| 99 void CreateOrUpdateContextMessageView(const Notification& notification); | 101 void CreateOrUpdateContextMessageView(const Notification& notification); |
| 100 void CreateOrUpdateSettingsButtonView(const Notification& notification); | 102 void CreateOrUpdateSettingsButtonView(const Notification& notification); |
| 101 void CreateOrUpdateProgressBarView(const Notification& notification); | 103 void CreateOrUpdateProgressBarView(const Notification& notification); |
| 104 void CreateOrUpdateIndeterminateProgressBarView( | |
| 105 const Notification& notification); | |
| 102 void CreateOrUpdateListItemViews(const Notification& notification); | 106 void CreateOrUpdateListItemViews(const Notification& notification); |
| 103 void CreateOrUpdateIconView(const Notification& notification); | 107 void CreateOrUpdateIconView(const Notification& notification); |
| 104 void CreateOrUpdateImageView(const Notification& notification); | 108 void CreateOrUpdateImageView(const Notification& notification); |
| 105 void CreateOrUpdateActionButtonViews(const Notification& notification); | 109 void CreateOrUpdateActionButtonViews(const Notification& notification); |
| 106 | 110 |
| 107 int GetMessageLineLimit(int title_lines, int width) const; | 111 int GetMessageLineLimit(int title_lines, int width) const; |
| 108 int GetMessageHeight(int width, int limit) const; | 112 int GetMessageHeight(int width, int limit) const; |
| 109 | 113 |
| 110 // Formats the context message to be displayed based on |context| | 114 // Formats the context message to be displayed based on |context| |
| 111 // so it shows as much information as possible | 115 // so it shows as much information as possible |
| (...skipping 10 matching lines...) Expand all Loading... | |
| 122 views::View* top_view_; | 126 views::View* top_view_; |
| 123 BoundedLabel* title_view_; | 127 BoundedLabel* title_view_; |
| 124 BoundedLabel* message_view_; | 128 BoundedLabel* message_view_; |
| 125 BoundedLabel* context_message_view_; | 129 BoundedLabel* context_message_view_; |
| 126 views::ImageButton* settings_button_view_; | 130 views::ImageButton* settings_button_view_; |
| 127 std::vector<views::View*> item_views_; | 131 std::vector<views::View*> item_views_; |
| 128 ProportionalImageView* icon_view_; | 132 ProportionalImageView* icon_view_; |
| 129 views::View* bottom_view_; | 133 views::View* bottom_view_; |
| 130 views::View* image_container_; | 134 views::View* image_container_; |
| 131 ProportionalImageView* image_view_; | 135 ProportionalImageView* image_view_; |
| 132 views::ProgressBar* progress_bar_view_; | 136 NotificationProgressBar* progress_bar_view_; |
| 137 NotificationIndeterminateProgressBar* indeterminate_progress_bar_view_; | |
|
Jun Mukai
2015/11/24 17:51:12
I don't think we should have two different instanc
yoshiki
2015/11/25 15:14:28
Done.
| |
| 133 std::vector<NotificationButton*> action_buttons_; | 138 std::vector<NotificationButton*> action_buttons_; |
| 134 std::vector<views::View*> separators_; | 139 std::vector<views::View*> separators_; |
| 135 | 140 |
| 136 DISALLOW_COPY_AND_ASSIGN(NotificationView); | 141 DISALLOW_COPY_AND_ASSIGN(NotificationView); |
| 137 }; | 142 }; |
| 138 | 143 |
| 139 } // namespace message_center | 144 } // namespace message_center |
| 140 | 145 |
| 141 #endif // UI_MESSAGE_CENTER_VIEWS_NOTIFICATION_VIEW_H_ | 146 #endif // UI_MESSAGE_CENTER_VIEWS_NOTIFICATION_VIEW_H_ |
| OLD | NEW |