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 ASH_SYSTEM_TRAY_TRAY_NOTIFICATION_VIEW_H_ | 5 #ifndef ASH_SYSTEM_TRAY_TRAY_NOTIFICATION_VIEW_H_ |
6 #define ASH_SYSTEM_TRAY_TRAY_NOTIFICATION_VIEWS_H_ | 6 #define ASH_SYSTEM_TRAY_TRAY_NOTIFICATION_VIEWS_H_ |
7 | 7 |
8 #include "ui/views/controls/button/image_button.h" | 8 #include "ui/views/controls/button/image_button.h" |
9 #include "ui/views/controls/slide_out_view.h" | 9 #include "ui/views/controls/slide_out_view.h" |
10 | 10 |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
52 const gfx::ImageSkia& image); | 52 const gfx::ImageSkia& image); |
53 | 53 |
54 // Overridden from ButtonListener. | 54 // Overridden from ButtonListener. |
55 virtual void ButtonPressed(views::Button* sender, | 55 virtual void ButtonPressed(views::Button* sender, |
56 const ui::Event& event) OVERRIDE; | 56 const ui::Event& event) OVERRIDE; |
57 | 57 |
58 // Overridden from views::View. | 58 // Overridden from views::View. |
59 virtual bool OnMousePressed(const ui::MouseEvent& event) OVERRIDE; | 59 virtual bool OnMousePressed(const ui::MouseEvent& event) OVERRIDE; |
60 | 60 |
61 // Overridden from ui::EventHandler. | 61 // Overridden from ui::EventHandler. |
62 virtual ui::EventResult OnGestureEvent(ui::GestureEvent* event) OVERRIDE; | 62 virtual void OnGestureEvent(ui::GestureEvent* event) OVERRIDE; |
63 | 63 |
64 protected: | 64 protected: |
65 // Called when the close button is pressed. Does nothing by default. | 65 // Called when the close button is pressed. Does nothing by default. |
66 virtual void OnClose(); | 66 virtual void OnClose(); |
67 // Called when the notification is clicked on. Does nothing by default. | 67 // Called when the notification is clicked on. Does nothing by default. |
68 virtual void OnClickAction(); | 68 virtual void OnClickAction(); |
69 | 69 |
70 // Overridden from views::SlideOutView. | 70 // Overridden from views::SlideOutView. |
71 virtual void OnSlideOut() OVERRIDE; | 71 virtual void OnSlideOut() OVERRIDE; |
72 | 72 |
73 SystemTrayItem* owner() { return owner_; } | 73 SystemTrayItem* owner() { return owner_; } |
74 | 74 |
75 private: | 75 private: |
76 void HandleClose(); | 76 void HandleClose(); |
77 void HandleClickAction(); | 77 void HandleClickAction(); |
78 | 78 |
79 SystemTrayItem* owner_; | 79 SystemTrayItem* owner_; |
80 int icon_id_; | 80 int icon_id_; |
81 views::ImageView* icon_; | 81 views::ImageView* icon_; |
82 | 82 |
83 DISALLOW_COPY_AND_ASSIGN(TrayNotificationView); | 83 DISALLOW_COPY_AND_ASSIGN(TrayNotificationView); |
84 }; | 84 }; |
85 | 85 |
86 } // namespace internal | 86 } // namespace internal |
87 } // namespace ash | 87 } // namespace ash |
88 | 88 |
89 #endif // ASH_SYSTEM_TRAY_TRAY_NOTIFICATION_VIEWS_H_ | 89 #endif // ASH_SYSTEM_TRAY_TRAY_NOTIFICATION_VIEWS_H_ |
OLD | NEW |