| 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_MESSAGE_VIEW_H_ | 5 #ifndef UI_MESSAGE_CENTER_MESSAGE_VIEW_H_ |
| 6 #define UI_MESSAGE_CENTER_MESSAGE_VIEW_H_ | 6 #define UI_MESSAGE_CENTER_MESSAGE_VIEW_H_ |
| 7 | 7 |
| 8 #include "ui/message_center/notification_list.h" | 8 #include "ui/message_center/notification_list.h" |
| 9 #include "ui/views/controls/button/button.h" | 9 #include "ui/views/controls/button/button.h" |
| 10 #include "ui/views/controls/slide_out_view.h" | 10 #include "ui/views/controls/slide_out_view.h" |
| (...skipping 25 matching lines...) Expand all Loading... |
| 36 // Creates the elements that make up the view layout. Must be called | 36 // Creates the elements that make up the view layout. Must be called |
| 37 // immediately after construction. | 37 // immediately after construction. |
| 38 virtual void SetUpView() = 0; | 38 virtual void SetUpView() = 0; |
| 39 | 39 |
| 40 void set_scroller(views::ScrollView* scroller) { scroller_ = scroller; } | 40 void set_scroller(views::ScrollView* scroller) { scroller_ = scroller; } |
| 41 | 41 |
| 42 // views::View overrides. | 42 // views::View overrides. |
| 43 virtual bool OnMousePressed(const ui::MouseEvent& event) OVERRIDE; | 43 virtual bool OnMousePressed(const ui::MouseEvent& event) OVERRIDE; |
| 44 | 44 |
| 45 // ui::EventHandler overrides. | 45 // ui::EventHandler overrides. |
| 46 virtual ui::EventResult OnGestureEvent(ui::GestureEvent* event) OVERRIDE; | 46 virtual void OnGestureEvent(ui::GestureEvent* event) OVERRIDE; |
| 47 | 47 |
| 48 // Overridden from ButtonListener. | 48 // Overridden from ButtonListener. |
| 49 virtual void ButtonPressed(views::Button* sender, | 49 virtual void ButtonPressed(views::Button* sender, |
| 50 const ui::Event& event) OVERRIDE; | 50 const ui::Event& event) OVERRIDE; |
| 51 | 51 |
| 52 protected: | 52 protected: |
| 53 MessageView(); | 53 MessageView(); |
| 54 | 54 |
| 55 // Shows the menu for the notification. | 55 // Shows the menu for the notification. |
| 56 void ShowMenu(gfx::Point screen_location); | 56 void ShowMenu(gfx::Point screen_location); |
| 57 | 57 |
| 58 // Overridden from views::SlideOutView. | 58 // Overridden from views::SlideOutView. |
| 59 virtual void OnSlideOut() OVERRIDE; | 59 virtual void OnSlideOut() OVERRIDE; |
| 60 | 60 |
| 61 NotificationList::Delegate* list_delegate_; | 61 NotificationList::Delegate* list_delegate_; |
| 62 NotificationList::Notification notification_; | 62 NotificationList::Notification notification_; |
| 63 views::ImageButton* close_button_; | 63 views::ImageButton* close_button_; |
| 64 | 64 |
| 65 views::ScrollView* scroller_; | 65 views::ScrollView* scroller_; |
| 66 | 66 |
| 67 DISALLOW_COPY_AND_ASSIGN(MessageView); | 67 DISALLOW_COPY_AND_ASSIGN(MessageView); |
| 68 }; | 68 }; |
| 69 | 69 |
| 70 } // namespace message_center | 70 } // namespace message_center |
| 71 | 71 |
| 72 #endif // UI_MESSAGE_CENTER_MESSAGE_VIEW_H_ | 72 #endif // UI_MESSAGE_CENTER_MESSAGE_VIEW_H_ |
| OLD | NEW |