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

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

Issue 2870283002: Move message_center::CustomNotificationView to arc::ArcNotificationView (Closed)
Patch Set: Addressed comment 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
« no previous file with comments | « ui/arc/DEPS ('k') | ui/arc/notification/arc_custom_notification_view.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 // ArcCustomNotificationView is a view to host NotificationSurface and show the
41 // content in itself. This is implemented as a child of ArcNotificationView.
42 // TODO(yoshiki): Rename this class to ArcNotificationContentsView.
40 class ArcCustomNotificationView 43 class ArcCustomNotificationView
41 : public views::NativeViewHost, 44 : public views::NativeViewHost,
42 public views::ButtonListener, 45 public views::ButtonListener,
43 public aura::WindowObserver, 46 public aura::WindowObserver,
44 public ArcNotificationItem::Observer, 47 public ArcNotificationItem::Observer,
45 public ArcNotificationSurfaceManager::Observer, 48 public ArcNotificationSurfaceManager::Observer,
46 public gfx::AnimationDelegate { 49 public gfx::AnimationDelegate {
47 public: 50 public:
48 explicit ArcCustomNotificationView(ArcNotificationItem* item); 51 explicit ArcCustomNotificationView(ArcNotificationItem* item);
49 ~ArcCustomNotificationView() override; 52 ~ArcCustomNotificationView() override;
50 53
51 std::unique_ptr<message_center::CustomNotificationContentViewDelegate> 54 std::unique_ptr<ArcNotificationContentViewDelegate>
52 CreateContentViewDelegate(); 55 CreateContentViewDelegate();
53 56
54 private: 57 private:
55 class ContentViewDelegate; 58 class ContentViewDelegate;
56 class EventForwarder; 59 class EventForwarder;
57 class SettingsButton; 60 class SettingsButton;
58 class SlideHelper; 61 class SlideHelper;
59 62
60 // A image button class used for the settings button and the close button. 63 // 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<> 64 // We can't use forward declaration for this class due to std::unique_ptr<>
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
150 bool in_layout_ = false; 153 bool in_layout_ = false;
151 154
152 std::unique_ptr<gfx::LinearAnimation> control_button_color_animation_; 155 std::unique_ptr<gfx::LinearAnimation> control_button_color_animation_;
153 156
154 DISALLOW_COPY_AND_ASSIGN(ArcCustomNotificationView); 157 DISALLOW_COPY_AND_ASSIGN(ArcCustomNotificationView);
155 }; 158 };
156 159
157 } // namespace arc 160 } // namespace arc
158 161
159 #endif // UI_ARC_NOTIFICATION_ARC_CUSTOM_NOTIFICATION_VIEW_H_ 162 #endif // UI_ARC_NOTIFICATION_ARC_CUSTOM_NOTIFICATION_VIEW_H_
OLDNEW
« no previous file with comments | « ui/arc/DEPS ('k') | ui/arc/notification/arc_custom_notification_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698