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

Unified Diff: chrome/browser/chromeos/arc/notification/arc_notification_item.h

Issue 1475583002: Add IPC messages for ARC notification (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month 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 side-by-side diff with in-line comments
Download patch
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..d20a3f9fe0a552d0fd6361e6a02ceaa9a505f746
--- /dev/null
+++ b/chrome/browser/chromeos/arc/notification/arc_notification_item.h
@@ -0,0 +1,48 @@
+// 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 "components/arc/common/arc_notification_types.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);
+ ~ArcNotificationItem() override;
+
+ void OnClosedFromAndroid();
+ void Close(bool by_user);
+ void Click();
+
+ // ImageDecoder::ImageRequest implementation
+ void OnImageDecoded(const SkBitmap& bitmap) override;
+
+ private:
+ ArcNotificationManager* manager_;
+ message_center::MessageCenter* message_center_;
+ arc::ArcNotificationData data_;
+
+ std::string notification_id_;
+
+ base::WeakPtrFactory<ArcNotificationItem> weak_ptr_factory_;
+
+ DISALLOW_COPY_AND_ASSIGN(ArcNotificationItem);
+};
+
+} // namespace chromeos
+
+#endif // CHROME_BROWSER_CHROMEOS_ARC_NOTIFICATION_ARC_NOTIFICATION_ITEM_H_

Powered by Google App Engine
This is Rietveld 408576698