Chromium Code Reviews| Index: chrome/browser/chromeos/arc/notification/arc_notification_item.h |
| diff --git a/chrome/browser/chromeos/arc/notification/arc_notification_item.h b/chrome/browser/chromeos/arc/notification/arc_notification_item.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..7e9023ada4ea2575660349efadc21025ff0f8869 |
| --- /dev/null |
| +++ b/chrome/browser/chromeos/arc/notification/arc_notification_item.h |
| @@ -0,0 +1,55 @@ |
| +// Copyright 2015 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef CHROME_BROWSER_CHROMEOS_ARC_NOTIFICATION_ARC_NOTIFICATION_ITEM_H_ |
| +#define CHROME_BROWSER_CHROMEOS_ARC_NOTIFICATION_ARC_NOTIFICATION_ITEM_H_ |
| + |
| +#include <string> |
| + |
| +#include "base/macros.h" |
| +#include "base/memory/weak_ptr.h" |
| +#include "chrome/browser/chromeos/arc/notification/arc_notification_manager.h" |
| +#include "chrome/browser/image_decoder.h" |
| +#include "third_party/skia/include/core/SkBitmap.h" |
| +#include "ui/message_center/message_center.h" |
| + |
| +namespace chromeos { |
| + |
| +class ArcNotificationItem : public ImageDecoder::ImageRequest { |
| + public: |
| + ArcNotificationItem(ArcNotificationManager* manager, |
| + message_center::MessageCenter* message_center, |
| + const arc::ArcNotificationData& data, |
| + Profile* profile); |
| + ~ArcNotificationItem() override; |
| + |
| + void UpdateWithArcNotificationData(const arc::ArcNotificationData& data); |
| + |
| + // Methods called from ArcNotificationManager: |
| + void OnClosedFromAndroid(); |
| + |
| + // Methods called from ArcNotificationItemDelegate: |
| + void Close(bool by_user); |
| + void Click(); |
| + |
| + // ImageDecoder::ImageRequest implementation: |
| + void OnImageDecoded(const SkBitmap& bitmap) override; |
| + |
| + private: |
| + ArcNotificationManager* const manager_; |
|
hidehiko
2015/12/11 05:18:00
nit: Personally, I rarely see "const" after "*" in
yoshiki
2015/12/14 15:19:29
As I grep'd, it is used many time in Chromium. I t
|
| + message_center::MessageCenter* const message_center_; |
| + Profile* const profile_; |
| + |
| + std::string notification_id_; |
| + std::string notification_key_; |
| + scoped_ptr<message_center::Notification> notification_; |
| + |
| + base::WeakPtrFactory<ArcNotificationItem> weak_ptr_factory_; |
| + |
| + DISALLOW_COPY_AND_ASSIGN(ArcNotificationItem); |
| +}; |
| + |
| +} // namespace chromeos |
| + |
| +#endif // CHROME_BROWSER_CHROMEOS_ARC_NOTIFICATION_ARC_NOTIFICATION_ITEM_H_ |