| 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/view.h" | 9 #include "ui/views/view.h" |
| 10 | 10 |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 47 // Replaces the contents view and updates the icon image. | 47 // Replaces the contents view and updates the icon image. |
| 48 void UpdateViewAndImage(views::View* new_contents, | 48 void UpdateViewAndImage(views::View* new_contents, |
| 49 const gfx::ImageSkia& image); | 49 const gfx::ImageSkia& image); |
| 50 | 50 |
| 51 // Overridden from ButtonListener. | 51 // Overridden from ButtonListener. |
| 52 virtual void ButtonPressed(views::Button* sender, | 52 virtual void ButtonPressed(views::Button* sender, |
| 53 const ui::Event& event) OVERRIDE; | 53 const ui::Event& event) OVERRIDE; |
| 54 | 54 |
| 55 // Overridden from views::View. | 55 // Overridden from views::View. |
| 56 virtual bool OnMousePressed(const ui::MouseEvent& event) OVERRIDE; | 56 virtual bool OnMousePressed(const ui::MouseEvent& event) OVERRIDE; |
| 57 virtual ui::GestureStatus OnGestureEvent( | 57 virtual ui::EventResult OnGestureEvent( |
| 58 const ui::GestureEvent& event) OVERRIDE; | 58 const ui::GestureEvent& event) OVERRIDE; |
| 59 | 59 |
| 60 protected: | 60 protected: |
| 61 // Called when the close button is pressed. Does nothing by default. | 61 // Called when the close button is pressed. Does nothing by default. |
| 62 virtual void OnClose(); | 62 virtual void OnClose(); |
| 63 // Called when the notification is clicked on. Does nothing by default. | 63 // Called when the notification is clicked on. Does nothing by default. |
| 64 virtual void OnClickAction(); | 64 virtual void OnClickAction(); |
| 65 | 65 |
| 66 SystemTrayItem* tray() { return tray_; } | 66 SystemTrayItem* tray() { return tray_; } |
| 67 | 67 |
| 68 private: | 68 private: |
| 69 void HandleClose(); | 69 void HandleClose(); |
| 70 void HandleClickAction(); | 70 void HandleClickAction(); |
| 71 | 71 |
| 72 SystemTrayItem* tray_; | 72 SystemTrayItem* tray_; |
| 73 int icon_id_; | 73 int icon_id_; |
| 74 views::ImageView* icon_; | 74 views::ImageView* icon_; |
| 75 | 75 |
| 76 DISALLOW_COPY_AND_ASSIGN(TrayNotificationView); | 76 DISALLOW_COPY_AND_ASSIGN(TrayNotificationView); |
| 77 }; | 77 }; |
| 78 | 78 |
| 79 } // namespace internal | 79 } // namespace internal |
| 80 } // namespace ash | 80 } // namespace ash |
| 81 | 81 |
| 82 #endif // ASH_SYSTEM_TRAY_TRAY_NOTIFICATION_VIEWS_H_ | 82 #endif // ASH_SYSTEM_TRAY_TRAY_NOTIFICATION_VIEWS_H_ |
| OLD | NEW |