OLD | NEW |
(Empty) | |
| 1 // Copyright 2015 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 CHROME_BROWSER_CHROMEOS_ARC_NOTIFICATION_ARC_NOTIFICATION_ITEM_H_ |
| 6 #define CHROME_BROWSER_CHROMEOS_ARC_NOTIFICATION_ARC_NOTIFICATION_ITEM_H_ |
| 7 |
| 8 #include <string> |
| 9 |
| 10 #include "base/macros.h" |
| 11 #include "base/memory/weak_ptr.h" |
| 12 #include "chrome/browser/chromeos/arc/notification/arc_notification_manager.h" |
| 13 #include "chrome/browser/image_decoder.h" |
| 14 #include "components/arc/common/arc_notification_types.h" |
| 15 #include "third_party/skia/include/core/SkBitmap.h" |
| 16 #include "ui/message_center/message_center.h" |
| 17 |
| 18 namespace chromeos { |
| 19 |
| 20 class ArcNotificationItem : public ImageDecoder::ImageRequest { |
| 21 public: |
| 22 ArcNotificationItem(ArcNotificationManager* manager, |
| 23 message_center::MessageCenter* message_center, |
| 24 const arc::ArcNotificationData& data); |
| 25 ~ArcNotificationItem() override; |
| 26 |
| 27 void OnClosedFromAndroid(); |
| 28 void Close(bool by_user); |
| 29 void Click(); |
| 30 |
| 31 // ImageDecoder::ImageRequest implementation |
| 32 void OnImageDecoded(const SkBitmap& bitmap) override; |
| 33 |
| 34 private: |
| 35 ArcNotificationManager* manager_; |
| 36 message_center::MessageCenter* message_center_; |
| 37 arc::ArcNotificationData data_; |
| 38 |
| 39 std::string notification_id_; |
| 40 |
| 41 base::WeakPtrFactory<ArcNotificationItem> weak_ptr_factory_; |
| 42 |
| 43 DISALLOW_COPY_AND_ASSIGN(ArcNotificationItem); |
| 44 }; |
| 45 |
| 46 } // namespace chromeos |
| 47 |
| 48 #endif // CHROME_BROWSER_CHROMEOS_ARC_NOTIFICATION_ARC_NOTIFICATION_ITEM_H_ |
OLD | NEW |