OLD | NEW |
(Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef UI_ARC_NOTIFICATION_ARC_CUSTOM_NOTIFICATION_ITEM_H_ |
| 6 #define UI_ARC_NOTIFICATION_ARC_CUSTOM_NOTIFICATION_ITEM_H_ |
| 7 |
| 8 #include "base/macros.h" |
| 9 #include "components/exo/notification_surface_registry.h" |
| 10 #include "ui/arc/notification/arc_notification_item.h" |
| 11 |
| 12 namespace arc { |
| 13 |
| 14 class ArcCustomNotificationItem |
| 15 : public ArcNotificationItem, |
| 16 public exo::NotificationSurfaceRegistry::Observer { |
| 17 public: |
| 18 ArcCustomNotificationItem(ArcNotificationManager* manager, |
| 19 message_center::MessageCenter* message_center, |
| 20 const std::string& notification_key, |
| 21 const AccountId& profile_id); |
| 22 ~ArcCustomNotificationItem() override; |
| 23 |
| 24 // TODO(xiyuan): Find a better way to expose NotificationSurfaceRegistry. |
| 25 static void SetNotificationSurfaceRegistry( |
| 26 exo::NotificationSurfaceRegistry* registry); |
| 27 |
| 28 void UpdateWithArcNotificationData( |
| 29 const mojom::ArcNotificationData& data) override; |
| 30 |
| 31 private: |
| 32 // NotificationSurfaceRegistry::Observer |
| 33 void OnNotificationSurfaceAdded(exo::NotificationSurface* surface) override; |
| 34 void OnNotificationSurfaceRemoved(exo::NotificationSurface* surface) override; |
| 35 |
| 36 DISALLOW_COPY_AND_ASSIGN(ArcCustomNotificationItem); |
| 37 }; |
| 38 |
| 39 } // namespace arc |
| 40 |
| 41 #endif // UI_ARC_NOTIFICATION_ARC_CUSTOM_NOTIFICATION_ITEM_H_ |
OLD | NEW |