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

Unified Diff: ui/message_center/views/notification_view.h

Issue 2966063003: Reland of Use shared NotificationControlButtonsView for non-arc notification buttons (Closed)
Patch Set: 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 side-by-side diff with in-line comments
Download patch
Index: ui/message_center/views/notification_view.h
diff --git a/ui/message_center/views/notification_view.h b/ui/message_center/views/notification_view.h
index 7fa691aff2549c245c7e95f39f5ad3b8b060deb5..9a9cf743b1678db1e0cbc1ba4a8225d146757958 100644
--- a/ui/message_center/views/notification_view.h
+++ b/ui/message_center/views/notification_view.h
@@ -24,6 +24,7 @@
class BoundedLabel;
class NotificationButton;
+class NotificationControlButtonsView;
class ProportionalImageView;
// View that displays all current types of notification (web, basic, image, and
@@ -57,9 +58,6 @@
void RequestFocusOnCloseButton() override;
void UpdateControlButtonsVisibility() override;
- protected:
- views::ImageButton* close_button() { return close_button_.get(); }
-
private:
FRIEND_TEST_ALL_PREFIXES(NotificationViewTest, CreateOrUpdateTest);
FRIEND_TEST_ALL_PREFIXES(NotificationViewTest,
@@ -74,22 +72,19 @@
friend class NotificationViewTest;
- // views::ViewTargeterDelegate:
- views::View* TargetForRect(views::View* root, const gfx::Rect& rect) override;
-
void CreateOrUpdateViews(const Notification& notification);
void CreateOrUpdateTitleView(const Notification& notification);
void CreateOrUpdateMessageView(const Notification& notification);
void CreateOrUpdateContextMessageView(const Notification& notification);
- void CreateOrUpdateSettingsButtonView(const Notification& notification);
void CreateOrUpdateProgressBarView(const Notification& notification);
void CreateOrUpdateListItemViews(const Notification& notification);
void CreateOrUpdateIconView(const Notification& notification);
void CreateOrUpdateSmallIconView(const Notification& notification);
void CreateOrUpdateImageView(const Notification& notification);
void CreateOrUpdateActionButtonViews(const Notification& notification);
- void CreateOrUpdateCloseButtonView(const Notification& notification);
+ void UpdateControlButtonsVisibilityWithNotification(
+ const Notification& notification);
int GetMessageLineLimit(int title_lines, int width) const;
int GetMessageHeight(int width, int limit) const;
@@ -108,7 +103,6 @@
BoundedLabel* title_view_ = nullptr;
BoundedLabel* message_view_ = nullptr;
BoundedLabel* context_message_view_ = nullptr;
- views::ImageButton* settings_button_view_ = nullptr;
std::vector<views::View*> item_views_;
ProportionalImageView* icon_view_ = nullptr;
views::View* bottom_view_ = nullptr;
@@ -117,8 +111,8 @@
views::ProgressBar* progress_bar_view_ = nullptr;
std::vector<NotificationButton*> action_buttons_;
std::vector<views::View*> separators_;
- std::unique_ptr<views::ImageButton> close_button_ = nullptr;
std::unique_ptr<views::ImageView> small_image_view_;
+ NotificationControlButtonsView* control_buttons_view_;
DISALLOW_COPY_AND_ASSIGN(NotificationView);
};
« no previous file with comments | « ui/message_center/views/notification_control_buttons_view.cc ('k') | ui/message_center/views/notification_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698