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

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

Issue 2668583005: Not Remove Non-Closable Arc Popup When Close Button is Pressed (Closed)
Patch Set: rebase Created 3 years, 9 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
(...skipping 17 matching lines...) Expand all
28 28
29 namespace arc { 29 namespace arc {
30 30
31 class ArcCustomNotificationView 31 class ArcCustomNotificationView
32 : public views::NativeViewHost, 32 : public views::NativeViewHost,
33 public views::ButtonListener, 33 public views::ButtonListener,
34 public aura::WindowObserver, 34 public aura::WindowObserver,
35 public ArcCustomNotificationItem::Observer, 35 public ArcCustomNotificationItem::Observer,
36 public ArcNotificationSurfaceManager::Observer { 36 public ArcNotificationSurfaceManager::Observer {
37 public: 37 public:
38 explicit ArcCustomNotificationView(ArcCustomNotificationItem* item); 38 ArcCustomNotificationView(ArcCustomNotificationItem* item);
xiyuan 2017/03/02 20:39:51 "explicit" is required for single arg constructor
yoshiki 2017/03/03 01:22:04 Done.
39 ~ArcCustomNotificationView() override; 39 ~ArcCustomNotificationView() override;
40 40
41 std::unique_ptr<message_center::CustomNotificationContentViewDelegate> 41 std::unique_ptr<message_center::CustomNotificationContentViewDelegate>
42 CreateContentViewDelegate(); 42 CreateContentViewDelegate();
43 43
44 private: 44 private:
45 class ContentViewDelegate; 45 class ContentViewDelegate;
46 class ControlButton; 46 class ControlButton;
47 class EventForwarder; 47 class EventForwarder;
48 class SettingsButton; 48 class SettingsButton;
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 void OnWindowDestroying(aura::Window* window) override; 80 void OnWindowDestroying(aura::Window* window) override;
81 81
82 // ArcCustomNotificationItem::Observer 82 // ArcCustomNotificationItem::Observer
83 void OnItemDestroying() override; 83 void OnItemDestroying() override;
84 void OnItemUpdated() override; 84 void OnItemUpdated() override;
85 85
86 // ArcNotificationSurfaceManager::Observer: 86 // ArcNotificationSurfaceManager::Observer:
87 void OnNotificationSurfaceAdded(exo::NotificationSurface* surface) override; 87 void OnNotificationSurfaceAdded(exo::NotificationSurface* surface) override;
88 void OnNotificationSurfaceRemoved(exo::NotificationSurface* surface) override; 88 void OnNotificationSurfaceRemoved(exo::NotificationSurface* surface) override;
89 89
90 ArcCustomNotificationItem* item_ = nullptr; 90 ArcCustomNotificationItem* item_;
xiyuan 2017/03/02 20:39:51 nit: Why do we need to change this? It would be us
yoshiki 2017/03/03 01:22:04 Oops, you're right. Reverted.
91 exo::NotificationSurface* surface_ = nullptr; 91 exo::NotificationSurface* surface_ = nullptr;
92 92
93 const std::string notification_key_; 93 const std::string notification_key_;
94 94
95 // A pre-target event handler to forward events on the surface to this view. 95 // A pre-target event handler to forward events on the surface to this view.
96 // Using a pre-target event handler instead of a target handler on the surface 96 // Using a pre-target event handler instead of a target handler on the surface
97 // window because it has descendant aura::Window and the events on them need 97 // window because it has descendant aura::Window and the events on them need
98 // to be handled as well. 98 // to be handled as well.
99 // TODO(xiyuan): Revisit after exo::Surface no longer has an aura::Window. 99 // TODO(xiyuan): Revisit after exo::Surface no longer has an aura::Window.
100 std::unique_ptr<EventForwarder> event_forwarder_; 100 std::unique_ptr<EventForwarder> event_forwarder_;
(...skipping 14 matching lines...) Expand all
115 115
116 // Protects from call loops between Layout and OnWindowBoundsChanged. 116 // Protects from call loops between Layout and OnWindowBoundsChanged.
117 bool in_layout_ = false; 117 bool in_layout_ = false;
118 118
119 DISALLOW_COPY_AND_ASSIGN(ArcCustomNotificationView); 119 DISALLOW_COPY_AND_ASSIGN(ArcCustomNotificationView);
120 }; 120 };
121 121
122 } // namespace arc 122 } // namespace arc
123 123
124 #endif // UI_ARC_NOTIFICATION_ARC_CUSTOM_NOTIFICATION_VIEW_H_ 124 #endif // UI_ARC_NOTIFICATION_ARC_CUSTOM_NOTIFICATION_VIEW_H_
OLDNEW
« no previous file with comments | « ui/arc/notification/arc_custom_notification_item.cc ('k') | ui/arc/notification/arc_custom_notification_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698