| 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_ARC_NOTIFICATION_ARC_CUSTOM_NOTIFICATION_VIEW_H_ | 5 #ifndef UI_ARC_NOTIFICATION_ARC_CUSTOM_NOTIFICATION_VIEW_H_ |
| 6 #define UI_ARC_NOTIFICATION_ARC_CUSTOM_NOTIFICATION_VIEW_H_ | 6 #define UI_ARC_NOTIFICATION_ARC_CUSTOM_NOTIFICATION_VIEW_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| 11 #include "base/macros.h" | 11 #include "base/macros.h" |
| 12 #include "ui/arc/notification/arc_custom_notification_item.h" | 12 #include "ui/arc/notification/arc_custom_notification_item.h" |
| 13 #include "ui/arc/notification/arc_notification_surface_manager.h" | 13 #include "ui/arc/notification/arc_notification_surface_manager.h" |
| 14 #include "ui/aura/window_observer.h" | 14 #include "ui/aura/window_observer.h" |
| 15 #include "ui/message_center/views/custom_notification_content_view_delegate.h" | 15 #include "ui/message_center/views/custom_notification_content_view_delegate.h" |
| 16 #include "ui/views/controls/button/button.h" | 16 #include "ui/views/controls/button/button.h" |
| 17 #include "ui/views/controls/native/native_view_host.h" | 17 #include "ui/views/controls/native/native_view_host.h" |
| 18 | 18 |
| 19 namespace exo { | 19 namespace exo { |
| 20 class NotificationSurface; | 20 class NotificationSurface; |
| 21 } | 21 } |
| 22 | 22 |
| 23 namespace views { | 23 namespace views { |
| 24 class FocusTraversable; | 24 class FocusTraversable; |
| 25 class ImageButton; | |
| 26 class Widget; | 25 class Widget; |
| 27 } | 26 } |
| 28 | 27 |
| 29 namespace arc { | 28 namespace arc { |
| 30 | 29 |
| 31 class ArcCustomNotificationView | 30 class ArcCustomNotificationView |
| 32 : public views::NativeViewHost, | 31 : public views::NativeViewHost, |
| 33 public views::ButtonListener, | 32 public views::ButtonListener, |
| 34 public aura::WindowObserver, | 33 public aura::WindowObserver, |
| 35 public ArcCustomNotificationItem::Observer, | 34 public ArcCustomNotificationItem::Observer, |
| (...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 103 // when a slide is in progress and restore the surface when it finishes. | 102 // when a slide is in progress and restore the surface when it finishes. |
| 104 std::unique_ptr<SlideHelper> slide_helper_; | 103 std::unique_ptr<SlideHelper> slide_helper_; |
| 105 | 104 |
| 106 // A control buttons on top of NotificationSurface. Needed because the | 105 // A control buttons on top of NotificationSurface. Needed because the |
| 107 // aura::Window of NotificationSurface is added after hosting widget's | 106 // aura::Window of NotificationSurface is added after hosting widget's |
| 108 // RootView thus standard notification control buttons are always below | 107 // RootView thus standard notification control buttons are always below |
| 109 // it. | 108 // it. |
| 110 std::unique_ptr<views::Widget> floating_control_buttons_widget_; | 109 std::unique_ptr<views::Widget> floating_control_buttons_widget_; |
| 111 | 110 |
| 112 views::View* control_buttons_view_ = nullptr; | 111 views::View* control_buttons_view_ = nullptr; |
| 113 views::ImageButton* close_button_ = nullptr; | 112 ControlButton* close_button_ = nullptr; |
| 114 views::ImageButton* settings_button_ = nullptr; | 113 ControlButton* settings_button_ = nullptr; |
| 115 | 114 |
| 116 // Protects from call loops between Layout and OnWindowBoundsChanged. | 115 // Protects from call loops between Layout and OnWindowBoundsChanged. |
| 117 bool in_layout_ = false; | 116 bool in_layout_ = false; |
| 118 | 117 |
| 119 DISALLOW_COPY_AND_ASSIGN(ArcCustomNotificationView); | 118 DISALLOW_COPY_AND_ASSIGN(ArcCustomNotificationView); |
| 120 }; | 119 }; |
| 121 | 120 |
| 122 } // namespace arc | 121 } // namespace arc |
| 123 | 122 |
| 124 #endif // UI_ARC_NOTIFICATION_ARC_CUSTOM_NOTIFICATION_VIEW_H_ | 123 #endif // UI_ARC_NOTIFICATION_ARC_CUSTOM_NOTIFICATION_VIEW_H_ |
| OLD | NEW |