| OLD | NEW |
| (Empty) |
| 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 | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef ASH_COMMON_SYSTEM_TRAY_TRAY_NOTIFICATION_VIEW_H_ | |
| 6 #define ASH_COMMON_SYSTEM_TRAY_TRAY_NOTIFICATION_VIEW_H_ | |
| 7 | |
| 8 #include "ui/views/view.h" | |
| 9 | |
| 10 namespace views { | |
| 11 class ImageView; | |
| 12 } | |
| 13 | |
| 14 namespace ash { | |
| 15 | |
| 16 // A view for closable notification views, laid out like: | |
| 17 // ------------------- | |
| 18 // | icon contents x | | |
| 19 // ----------------v-- | |
| 20 // The close button will call OnClose() when clicked. | |
| 21 class TrayNotificationView : public views::View { | |
| 22 public: | |
| 23 // If icon_id is 0, no icon image will be set. | |
| 24 explicit TrayNotificationView(int icon_id); | |
| 25 ~TrayNotificationView() override; | |
| 26 | |
| 27 // InitView must be called once with the contents to be displayed. | |
| 28 void InitView(views::View* contents); | |
| 29 | |
| 30 private: | |
| 31 int icon_id_; | |
| 32 views::ImageView* icon_; | |
| 33 | |
| 34 DISALLOW_COPY_AND_ASSIGN(TrayNotificationView); | |
| 35 }; | |
| 36 | |
| 37 } // namespace ash | |
| 38 | |
| 39 #endif // ASH_COMMON_SYSTEM_TRAY_TRAY_NOTIFICATION_VIEW_H_ | |
| OLD | NEW |