| 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" |
| (...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 87 void CreateOrUpdateListItemViews(const Notification& notification); | 87 void CreateOrUpdateListItemViews(const Notification& notification); |
| 88 void CreateOrUpdateIconView(const Notification& notification); | 88 void CreateOrUpdateIconView(const Notification& notification); |
| 89 void CreateOrUpdateSmallIconView(const Notification& notification); | 89 void CreateOrUpdateSmallIconView(const Notification& notification); |
| 90 void CreateOrUpdateImageView(const Notification& notification); | 90 void CreateOrUpdateImageView(const Notification& notification); |
| 91 void CreateOrUpdateActionButtonViews(const Notification& notification); | 91 void CreateOrUpdateActionButtonViews(const Notification& notification); |
| 92 void CreateOrUpdateCloseButtonView(const Notification& notification); | 92 void CreateOrUpdateCloseButtonView(const Notification& notification); |
| 93 | 93 |
| 94 int GetMessageLineLimit(int title_lines, int width) const; | 94 int GetMessageLineLimit(int title_lines, int width) const; |
| 95 int GetMessageHeight(int width, int limit) const; | 95 int GetMessageHeight(int width, int limit) const; |
| 96 | 96 |
| 97 // True if this view or its descendant views have focus. |
| 98 bool HasFocusedView(); |
| 99 |
| 97 // Formats the context message to be displayed based on |context| | 100 // Formats the context message to be displayed based on |context| |
| 98 // so it shows as much information as possible | 101 // so it shows as much information as possible |
| 99 // given the space available in the ContextMessage section of the | 102 // given the space available in the ContextMessage section of the |
| 100 // notification. | 103 // notification. |
| 101 base::string16 FormatContextMessage(const Notification& notification) const; | 104 base::string16 FormatContextMessage(const Notification& notification) const; |
| 102 | 105 |
| 103 // Describes whether the view should display a hand pointer or not. | 106 // Describes whether the view should display a hand pointer or not. |
| 104 bool clickable_; | 107 bool clickable_; |
| 105 | 108 |
| 106 // Weak references to NotificationView descendants owned by their parents. | 109 // Weak references to NotificationView descendants owned by their parents. |
| (...skipping 12 matching lines...) Expand all Loading... |
| 119 std::vector<views::View*> separators_; | 122 std::vector<views::View*> separators_; |
| 120 std::unique_ptr<views::ImageButton> close_button_ = nullptr; | 123 std::unique_ptr<views::ImageButton> close_button_ = nullptr; |
| 121 std::unique_ptr<views::ImageView> small_image_view_; | 124 std::unique_ptr<views::ImageView> small_image_view_; |
| 122 | 125 |
| 123 DISALLOW_COPY_AND_ASSIGN(NotificationView); | 126 DISALLOW_COPY_AND_ASSIGN(NotificationView); |
| 124 }; | 127 }; |
| 125 | 128 |
| 126 } // namespace message_center | 129 } // namespace message_center |
| 127 | 130 |
| 128 #endif // UI_MESSAGE_CENTER_VIEWS_NOTIFICATION_VIEW_H_ | 131 #endif // UI_MESSAGE_CENTER_VIEWS_NOTIFICATION_VIEW_H_ |
| OLD | NEW |