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

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

Issue 2744463002: Add VectorIconButton functionality to ImageButton. (Closed)
Patch Set: fix cros build Created 3 years, 9 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"
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"
15 #include "ui/views/controls/button/image_button.h" 14 #include "ui/views/controls/button/image_button.h"
16 #include "ui/views/view_targeter_delegate.h" 15 #include "ui/views/view_targeter_delegate.h"
17 16
18 namespace views { 17 namespace views {
19 class ImageView; 18 class ImageView;
20 class ProgressBar; 19 class ProgressBar;
21 } 20 }
22 21
23 namespace message_center { 22 namespace message_center {
24 23
25 class BoundedLabel; 24 class BoundedLabel;
26 class NotificationButton; 25 class NotificationButton;
27 class ProportionalImageView; 26 class ProportionalImageView;
28 27
29 // View that displays all current types of notification (web, basic, image, and 28 // View that displays all current types of notification (web, basic, image, and
30 // list) except the custom notification. Future notification types may be 29 // list) except the custom notification. Future notification types may be
31 // handled by other classes, in which case instances of those classes would be 30 // handled by other classes, in which case instances of those classes would be
32 // returned by the Create() factory method below. 31 // returned by the Create() factory method below.
33 class MESSAGE_CENTER_EXPORT NotificationView 32 class MESSAGE_CENTER_EXPORT NotificationView
34 : public MessageView, 33 : public MessageView,
35 public views::ButtonListener, 34 public views::ImageButtonDelegate,
36 public views::ViewTargeterDelegate { 35 public views::ViewTargeterDelegate {
37 public: 36 public:
38 NotificationView(MessageCenterController* controller, 37 NotificationView(MessageCenterController* controller,
39 const Notification& notification); 38 const Notification& notification);
40 ~NotificationView() override; 39 ~NotificationView() override;
41 40
42 // Overridden from views::View: 41 // Overridden from views::View:
43 gfx::Size GetPreferredSize() const override; 42 gfx::Size GetPreferredSize() const override;
44 int GetHeightForWidth(int width) const override; 43 int GetHeightForWidth(int width) const override;
45 void Layout() override; 44 void Layout() override;
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
119 std::vector<views::View*> separators_; 118 std::vector<views::View*> separators_;
120 std::unique_ptr<views::ImageButton> close_button_ = nullptr; 119 std::unique_ptr<views::ImageButton> close_button_ = nullptr;
121 std::unique_ptr<views::ImageView> small_image_view_; 120 std::unique_ptr<views::ImageView> small_image_view_;
122 121
123 DISALLOW_COPY_AND_ASSIGN(NotificationView); 122 DISALLOW_COPY_AND_ASSIGN(NotificationView);
124 }; 123 };
125 124
126 } // namespace message_center 125 } // namespace message_center
127 126
128 #endif // UI_MESSAGE_CENTER_VIEWS_NOTIFICATION_VIEW_H_ 127 #endif // UI_MESSAGE_CENTER_VIEWS_NOTIFICATION_VIEW_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698