Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(368)

Side by Side Diff: ui/arc/notification/arc_custom_notification_view.h

Issue 2870283002: Move message_center::CustomNotificationView to arc::ArcNotificationView (Closed)
Patch Set: Fixed test Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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_notification_content_view_delegate.h"
12 #include "ui/arc/notification/arc_notification_item.h" 13 #include "ui/arc/notification/arc_notification_item.h"
13 #include "ui/arc/notification/arc_notification_surface_manager.h" 14 #include "ui/arc/notification/arc_notification_surface_manager.h"
14 #include "ui/aura/window_observer.h" 15 #include "ui/aura/window_observer.h"
15 #include "ui/gfx/animation/animation_delegate.h" 16 #include "ui/gfx/animation/animation_delegate.h"
16 #include "ui/message_center/views/custom_notification_content_view_delegate.h"
17 #include "ui/message_center/views/padded_button.h" 17 #include "ui/message_center/views/padded_button.h"
18 #include "ui/views/controls/button/button.h" 18 #include "ui/views/controls/button/button.h"
19 #include "ui/views/controls/native/native_view_host.h" 19 #include "ui/views/controls/native/native_view_host.h"
20 20
21 namespace exo { 21 namespace exo {
22 class NotificationSurface; 22 class NotificationSurface;
23 } 23 }
24 24
25 namespace gfx { 25 namespace gfx {
26 class LinearAnimation; 26 class LinearAnimation;
27 } 27 }
28 28
29 namespace ui { 29 namespace ui {
30 struct AXActionData; 30 struct AXActionData;
31 } 31 }
32 32
33 namespace views { 33 namespace views {
34 class FocusTraversable; 34 class FocusTraversable;
35 class Widget; 35 class Widget;
36 } 36 }
37 37
38 namespace arc { 38 namespace arc {
39 39
40 // TODO(yoshiki): Rename this class to ArcNotificationContentsView.
hidehiko 2017/05/11 14:22:47 As you TODO'ed now we have ArcNotificationView and
yoshiki 2017/05/12 08:42:37 Done.
40 class ArcCustomNotificationView 41 class ArcCustomNotificationView
41 : public views::NativeViewHost, 42 : public views::NativeViewHost,
42 public views::ButtonListener, 43 public views::ButtonListener,
43 public aura::WindowObserver, 44 public aura::WindowObserver,
44 public ArcNotificationItem::Observer, 45 public ArcNotificationItem::Observer,
45 public ArcNotificationSurfaceManager::Observer, 46 public ArcNotificationSurfaceManager::Observer,
46 public gfx::AnimationDelegate { 47 public gfx::AnimationDelegate {
47 public: 48 public:
48 explicit ArcCustomNotificationView(ArcNotificationItem* item); 49 explicit ArcCustomNotificationView(ArcNotificationItem* item);
49 ~ArcCustomNotificationView() override; 50 ~ArcCustomNotificationView() override;
50 51
51 std::unique_ptr<message_center::CustomNotificationContentViewDelegate> 52 std::unique_ptr<ArcNotificationContentViewDelegate>
52 CreateContentViewDelegate(); 53 CreateContentViewDelegate();
53 54
54 private: 55 private:
55 class ContentViewDelegate; 56 class ContentViewDelegate;
56 class EventForwarder; 57 class EventForwarder;
57 class SettingsButton; 58 class SettingsButton;
58 class SlideHelper; 59 class SlideHelper;
59 60
60 // A image button class used for the settings button and the close button. 61 // A image button class used for the settings button and the close button.
61 // We can't use forward declaration for this class due to std::unique_ptr<> 62 // We can't use forward declaration for this class due to std::unique_ptr<>
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
152 bool in_layout_ = false; 153 bool in_layout_ = false;
153 154
154 std::unique_ptr<gfx::LinearAnimation> control_button_color_animation_; 155 std::unique_ptr<gfx::LinearAnimation> control_button_color_animation_;
155 156
156 DISALLOW_COPY_AND_ASSIGN(ArcCustomNotificationView); 157 DISALLOW_COPY_AND_ASSIGN(ArcCustomNotificationView);
157 }; 158 };
158 159
159 } // namespace arc 160 } // namespace arc
160 161
161 #endif // UI_ARC_NOTIFICATION_ARC_CUSTOM_NOTIFICATION_VIEW_H_ 162 #endif // UI_ARC_NOTIFICATION_ARC_CUSTOM_NOTIFICATION_VIEW_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698