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

Side by Side Diff: chrome/browser/chromeos/arc/notification/arc_notification_item.h

Issue 1477733002: Add ArcNotificationManager for new ARC notification (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix comment Created 5 years 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
(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 Profile* profile);
26 ~ArcNotificationItem() override;
27
28 // Methods called from ArcNotificationManager:
29 void OnClosedFromAndroid();
30
31 // Methods called from ArcNotificationItemDelegate:
32 void Close(bool by_user);
33 void Click();
34
35 // ImageDecoder::ImageRequest implementation:
36 void OnImageDecoded(const SkBitmap& bitmap) override;
37
38 private:
39 ArcNotificationManager* manager_;
40 message_center::MessageCenter* message_center_;
41 arc::ArcNotificationData data_;
42 Profile* profile_;
43
44 std::string notification_id_;
45
46 base::WeakPtrFactory<ArcNotificationItem> weak_ptr_factory_;
47
48 DISALLOW_COPY_AND_ASSIGN(ArcNotificationItem);
49 };
50
51 } // namespace chromeos
52
53 #endif // CHROME_BROWSER_CHROMEOS_ARC_NOTIFICATION_ARC_NOTIFICATION_ITEM_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698