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_MESSAGE_VIEW_H_ | 5 #ifndef UI_MESSAGE_CENTER_VIEWS_MESSAGE_VIEW_H_ |
6 #define UI_MESSAGE_CENTER_VIEWS_MESSAGE_VIEW_H_ | 6 #define UI_MESSAGE_CENTER_VIEWS_MESSAGE_VIEW_H_ |
7 | 7 |
| 8 #include <memory> |
| 9 |
8 #include "base/macros.h" | 10 #include "base/macros.h" |
9 #include "base/memory/scoped_ptr.h" | |
10 #include "base/strings/string16.h" | 11 #include "base/strings/string16.h" |
11 #include "third_party/skia/include/core/SkBitmap.h" | 12 #include "third_party/skia/include/core/SkBitmap.h" |
12 #include "third_party/skia/include/core/SkColor.h" | 13 #include "third_party/skia/include/core/SkColor.h" |
13 #include "ui/gfx/geometry/insets.h" | 14 #include "ui/gfx/geometry/insets.h" |
14 #include "ui/gfx/image/image.h" | 15 #include "ui/gfx/image/image.h" |
15 #include "ui/gfx/image/image_skia.h" | 16 #include "ui/gfx/image/image_skia.h" |
16 #include "ui/message_center/message_center_export.h" | 17 #include "ui/message_center/message_center_export.h" |
17 #include "ui/message_center/notification.h" | 18 #include "ui/message_center/notification.h" |
18 #include "ui/views/controls/button/button.h" | 19 #include "ui/views/controls/button/button.h" |
19 #include "ui/views/controls/slide_out_view.h" | 20 #include "ui/views/controls/slide_out_view.h" |
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
101 void OnSlideOut() override; | 102 void OnSlideOut() override; |
102 | 103 |
103 views::ImageView* small_image() { return small_image_view_.get(); } | 104 views::ImageView* small_image() { return small_image_view_.get(); } |
104 views::ScrollView* scroller() { return scroller_; } | 105 views::ScrollView* scroller() { return scroller_; } |
105 | 106 |
106 private: | 107 private: |
107 MessageViewController* controller_; | 108 MessageViewController* controller_; |
108 std::string notification_id_; | 109 std::string notification_id_; |
109 NotifierId notifier_id_; | 110 NotifierId notifier_id_; |
110 views::View* background_view_; // Owned by views hierarchy. | 111 views::View* background_view_; // Owned by views hierarchy. |
111 scoped_ptr<views::ImageView> small_image_view_; | 112 std::unique_ptr<views::ImageView> small_image_view_; |
112 views::ScrollView* scroller_; | 113 views::ScrollView* scroller_; |
113 | 114 |
114 base::string16 accessible_name_; | 115 base::string16 accessible_name_; |
115 | 116 |
116 base::string16 display_source_; | 117 base::string16 display_source_; |
117 | 118 |
118 scoped_ptr<views::Painter> focus_painter_; | 119 std::unique_ptr<views::Painter> focus_painter_; |
119 | 120 |
120 // Changes the background color being used by |background_view_| and schedules | 121 // Changes the background color being used by |background_view_| and schedules |
121 // a paint. | 122 // a paint. |
122 void SetDrawBackgroundAsActive(bool active); | 123 void SetDrawBackgroundAsActive(bool active); |
123 | 124 |
124 DISALLOW_COPY_AND_ASSIGN(MessageView); | 125 DISALLOW_COPY_AND_ASSIGN(MessageView); |
125 }; | 126 }; |
126 | 127 |
127 } // namespace message_center | 128 } // namespace message_center |
128 | 129 |
129 #endif // UI_MESSAGE_CENTER_VIEWS_MESSAGE_VIEW_H_ | 130 #endif // UI_MESSAGE_CENTER_VIEWS_MESSAGE_VIEW_H_ |
OLD | NEW |