OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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_CUSTOM_NOTIFICATION_VIEW_H_ | 5 #ifndef UI_MESSAGE_CENTER_VIEWS_CUSTOM_NOTIFICATION_VIEW_H_ |
6 #define UI_MESSAGE_CENTER_VIEWS_CUSTOM_NOTIFICATION_VIEW_H_ | 6 #define UI_MESSAGE_CENTER_VIEWS_CUSTOM_NOTIFICATION_VIEW_H_ |
7 | 7 |
8 #include "base/macros.h" | 8 #include "base/macros.h" |
9 #include "ui/message_center/message_center_export.h" | 9 #include "ui/message_center/message_center_export.h" |
10 #include "ui/message_center/views/message_view.h" | 10 #include "ui/message_center/views/message_view.h" |
(...skipping 28 matching lines...) Expand all Loading... |
39 | 39 |
40 // Overridden from views::View: | 40 // Overridden from views::View: |
41 const char* GetClassName() const override; | 41 const char* GetClassName() const override; |
42 gfx::Size GetPreferredSize() const override; | 42 gfx::Size GetPreferredSize() const override; |
43 void Layout() override; | 43 void Layout() override; |
44 bool HasFocus() const override; | 44 bool HasFocus() const override; |
45 void RequestFocus() override; | 45 void RequestFocus() override; |
46 void OnPaint(gfx::Canvas* canvas) override; | 46 void OnPaint(gfx::Canvas* canvas) override; |
47 bool OnKeyPressed(const ui::KeyEvent& event) override; | 47 bool OnKeyPressed(const ui::KeyEvent& event) override; |
48 void ChildPreferredSizeChanged(View* child) override; | 48 void ChildPreferredSizeChanged(View* child) override; |
| 49 bool OnMousePressed(const ui::MouseEvent& event) override; |
49 | 50 |
50 private: | 51 private: |
51 friend class CustomNotificationViewTest; | 52 friend class CustomNotificationViewTest; |
52 | 53 |
53 // The view for the custom content. Owned by view hierarchy. | 54 // The view for the custom content. Owned by view hierarchy. |
54 views::View* contents_view_ = nullptr; | 55 views::View* contents_view_ = nullptr; |
55 std::unique_ptr<CustomNotificationContentViewDelegate> | 56 std::unique_ptr<CustomNotificationContentViewDelegate> |
56 contents_view_delegate_; | 57 contents_view_delegate_; |
57 | 58 |
58 std::unique_ptr<views::Painter> focus_painter_; | 59 std::unique_ptr<views::Painter> focus_painter_; |
59 | 60 |
60 DISALLOW_COPY_AND_ASSIGN(CustomNotificationView); | 61 DISALLOW_COPY_AND_ASSIGN(CustomNotificationView); |
61 }; | 62 }; |
62 | 63 |
63 } // namespace message_center | 64 } // namespace message_center |
64 | 65 |
65 #endif // UI_MESSAGE_CENTER_VIEWS_CUSTOM_NOTIFICATION_VIEW_H_ | 66 #endif // UI_MESSAGE_CENTER_VIEWS_CUSTOM_NOTIFICATION_VIEW_H_ |
OLD | NEW |