| 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 16 matching lines...) Expand all Loading... |
| 27 | 27 |
| 28 // These method are called by the content view when focus handling is defered | 28 // These method are called by the content view when focus handling is defered |
| 29 // to the content. | 29 // to the content. |
| 30 void OnContentFocused(); | 30 void OnContentFocused(); |
| 31 void OnContentBlured(); | 31 void OnContentBlured(); |
| 32 | 32 |
| 33 // Overidden from MessageView: | 33 // Overidden from MessageView: |
| 34 void SetDrawBackgroundAsActive(bool active) override; | 34 void SetDrawBackgroundAsActive(bool active) override; |
| 35 bool IsCloseButtonFocused() const override; | 35 bool IsCloseButtonFocused() const override; |
| 36 void RequestFocusOnCloseButton() override; | 36 void RequestFocusOnCloseButton() override; |
| 37 bool IsPinned() const override; | |
| 38 void UpdateControlButtonsVisibility() override; | 37 void UpdateControlButtonsVisibility() override; |
| 39 | 38 |
| 40 // Overridden from views::View: | 39 // Overridden from views::View: |
| 41 const char* GetClassName() const override; | 40 const char* GetClassName() const override; |
| 42 gfx::Size GetPreferredSize() const override; | 41 gfx::Size GetPreferredSize() const override; |
| 43 void Layout() override; | 42 void Layout() override; |
| 44 bool HasFocus() const override; | 43 bool HasFocus() const override; |
| 45 void RequestFocus() override; | 44 void RequestFocus() override; |
| 46 void OnPaint(gfx::Canvas* canvas) override; | 45 void OnPaint(gfx::Canvas* canvas) override; |
| 47 bool OnKeyPressed(const ui::KeyEvent& event) override; | 46 bool OnKeyPressed(const ui::KeyEvent& event) override; |
| 48 void ChildPreferredSizeChanged(View* child) override; | 47 void ChildPreferredSizeChanged(View* child) override; |
| 49 bool OnMousePressed(const ui::MouseEvent& event) override; | 48 bool OnMousePressed(const ui::MouseEvent& event) override; |
| 50 | 49 |
| 51 private: | 50 private: |
| 52 friend class CustomNotificationViewTest; | 51 friend class CustomNotificationViewTest; |
| 53 | 52 |
| 54 // The view for the custom content. Owned by view hierarchy. | 53 // The view for the custom content. Owned by view hierarchy. |
| 55 views::View* contents_view_ = nullptr; | 54 views::View* contents_view_ = nullptr; |
| 56 std::unique_ptr<CustomNotificationContentViewDelegate> | 55 std::unique_ptr<CustomNotificationContentViewDelegate> |
| 57 contents_view_delegate_; | 56 contents_view_delegate_; |
| 58 | 57 |
| 59 std::unique_ptr<views::Painter> focus_painter_; | 58 std::unique_ptr<views::Painter> focus_painter_; |
| 60 | 59 |
| 61 DISALLOW_COPY_AND_ASSIGN(CustomNotificationView); | 60 DISALLOW_COPY_AND_ASSIGN(CustomNotificationView); |
| 62 }; | 61 }; |
| 63 | 62 |
| 64 } // namespace message_center | 63 } // namespace message_center |
| 65 | 64 |
| 66 #endif // UI_MESSAGE_CENTER_VIEWS_CUSTOM_NOTIFICATION_VIEW_H_ | 65 #endif // UI_MESSAGE_CENTER_VIEWS_CUSTOM_NOTIFICATION_VIEW_H_ |
| OLD | NEW |