| 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_CUSTOM_NOTIFICATION_CONTENT_VIEW_DELEGATE_H_ | 5 #ifndef UI_MESSAGE_CENTER_CUSTOM_NOTIFICATION_CONTENT_VIEW_DELEGATE_H_ |
| 6 #define UI_MESSAGE_CENTER_CUSTOM_NOTIFICATION_CONTENT_VIEW_DELEGATE_H_ | 6 #define UI_MESSAGE_CENTER_CUSTOM_NOTIFICATION_CONTENT_VIEW_DELEGATE_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 | 9 |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| 11 #include "ui/message_center/message_center_export.h" | 11 #include "ui/message_center/message_center_export.h" |
| 12 | 12 |
| 13 namespace views { | 13 namespace views { |
| 14 class View; | 14 class View; |
| 15 } // namespace views | 15 } // namespace views |
| 16 | 16 |
| 17 namespace message_center { | 17 namespace message_center { |
| 18 | 18 |
| 19 // Delegate for a view that is hosted by CustomNotificationView. | 19 // Delegate for a view that is hosted by CustomNotificationView. |
| 20 class MESSAGE_CENTER_EXPORT CustomNotificationContentViewDelegate { | 20 class MESSAGE_CENTER_EXPORT CustomNotificationContentViewDelegate { |
| 21 public: | 21 public: |
| 22 virtual bool IsCloseButtonFocused() const = 0; | 22 virtual bool IsCloseButtonFocused() const = 0; |
| 23 virtual void RequestFocusOnCloseButton() = 0; | 23 virtual void RequestFocusOnCloseButton() = 0; |
| 24 virtual bool IsPinned() const = 0; | 24 virtual bool IsPinned() const = 0; |
| 25 virtual void UpdateControlButtonsVisibility() = 0; | 25 virtual void UpdateControlButtonsVisibility() = 0; |
| 26 virtual void OnSlideChanged() = 0; |
| 26 }; | 27 }; |
| 27 | 28 |
| 28 // The struct to hold a view and CustomNotificationContentViewDelegate | 29 // The struct to hold a view and CustomNotificationContentViewDelegate |
| 29 // associating with the view. | 30 // associating with the view. |
| 30 struct MESSAGE_CENTER_EXPORT CustomContent { | 31 struct MESSAGE_CENTER_EXPORT CustomContent { |
| 31 public: | 32 public: |
| 32 CustomContent( | 33 CustomContent( |
| 33 std::unique_ptr<views::View> view, | 34 std::unique_ptr<views::View> view, |
| 34 std::unique_ptr<CustomNotificationContentViewDelegate> delegate); | 35 std::unique_ptr<CustomNotificationContentViewDelegate> delegate); |
| 35 ~CustomContent(); | 36 ~CustomContent(); |
| 36 | 37 |
| 37 std::unique_ptr<views::View> view; | 38 std::unique_ptr<views::View> view; |
| 38 std::unique_ptr<CustomNotificationContentViewDelegate> delegate; | 39 std::unique_ptr<CustomNotificationContentViewDelegate> delegate; |
| 39 | 40 |
| 40 private: | 41 private: |
| 41 DISALLOW_COPY_AND_ASSIGN(CustomContent); | 42 DISALLOW_COPY_AND_ASSIGN(CustomContent); |
| 42 }; | 43 }; |
| 43 | 44 |
| 44 } // namespace message_center | 45 } // namespace message_center |
| 45 | 46 |
| 46 #endif // UI_MESSAGE_CENTER_CUSTOM_NOTIFICATION_CONTENT_VIEW_DELEGATE_H_ | 47 #endif // UI_MESSAGE_CENTER_CUSTOM_NOTIFICATION_CONTENT_VIEW_DELEGATE_H_ |
| OLD | NEW |