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 25 matching lines...) Expand all Loading... |
36 | 36 |
37 // Overridden from views::View: | 37 // Overridden from views::View: |
38 gfx::Size GetPreferredSize() const override; | 38 gfx::Size GetPreferredSize() const override; |
39 void Layout() override; | 39 void Layout() override; |
40 bool HasFocus() const override; | 40 bool HasFocus() const override; |
41 void RequestFocus() override; | 41 void RequestFocus() override; |
42 void OnPaint(gfx::Canvas* canvas) override; | 42 void OnPaint(gfx::Canvas* canvas) override; |
43 bool OnKeyPressed(const ui::KeyEvent& event) override; | 43 bool OnKeyPressed(const ui::KeyEvent& event) override; |
44 void ChildPreferredSizeChanged(View* child) override; | 44 void ChildPreferredSizeChanged(View* child) override; |
45 | 45 |
| 46 views::View* GetContentsViewForTesting() const { return contents_view_; } |
| 47 |
46 private: | 48 private: |
47 friend class CustomNotificationViewTest; | 49 friend class CustomNotificationViewTest; |
48 | 50 |
49 // The view for the custom content. Owned by view hierarchy. | 51 // The view for the custom content. Owned by view hierarchy. |
50 views::View* contents_view_ = nullptr; | 52 views::View* contents_view_ = nullptr; |
51 std::unique_ptr<CustomNotificationContentViewDelegate> | 53 std::unique_ptr<CustomNotificationContentViewDelegate> |
52 contents_view_delegate_; | 54 contents_view_delegate_; |
53 | 55 |
54 std::unique_ptr<views::Painter> focus_painter_; | 56 std::unique_ptr<views::Painter> focus_painter_; |
55 | 57 |
56 DISALLOW_COPY_AND_ASSIGN(CustomNotificationView); | 58 DISALLOW_COPY_AND_ASSIGN(CustomNotificationView); |
57 }; | 59 }; |
58 | 60 |
59 } // namespace message_center | 61 } // namespace message_center |
60 | 62 |
61 #endif // UI_MESSAGE_CENTER_VIEWS_CUSTOM_NOTIFICATION_VIEW_H_ | 63 #endif // UI_MESSAGE_CENTER_VIEWS_CUSTOM_NOTIFICATION_VIEW_H_ |
OLD | NEW |