| 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 23 matching lines...) Expand all Loading... |
| 34 void RequestFocusOnCloseButton() override; | 34 void RequestFocusOnCloseButton() override; |
| 35 bool IsPinned() const override; | 35 bool IsPinned() const override; |
| 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 | 45 |
| 45 private: | 46 private: |
| 46 friend class CustomNotificationViewTest; | 47 friend class CustomNotificationViewTest; |
| 47 | 48 |
| 48 // The view for the custom content. Owned by view hierarchy. | 49 // The view for the custom content. Owned by view hierarchy. |
| 49 views::View* contents_view_ = nullptr; | 50 views::View* contents_view_ = nullptr; |
| 50 std::unique_ptr<CustomNotificationContentViewDelegate> | 51 std::unique_ptr<CustomNotificationContentViewDelegate> |
| 51 contents_view_delegate_; | 52 contents_view_delegate_; |
| 52 | 53 |
| 53 std::unique_ptr<views::Painter> focus_painter_; | 54 std::unique_ptr<views::Painter> focus_painter_; |
| 54 | 55 |
| 55 DISALLOW_COPY_AND_ASSIGN(CustomNotificationView); | 56 DISALLOW_COPY_AND_ASSIGN(CustomNotificationView); |
| 56 }; | 57 }; |
| 57 | 58 |
| 58 } // namespace message_center | 59 } // namespace message_center |
| 59 | 60 |
| 60 #endif // UI_MESSAGE_CENTER_VIEWS_CUSTOM_NOTIFICATION_VIEW_H_ | 61 #endif // UI_MESSAGE_CENTER_VIEWS_CUSTOM_NOTIFICATION_VIEW_H_ |
| OLD | NEW |