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

Side by Side Diff: ui/arc/notification/arc_notification_manager.h

Issue 2319893002: Merge "arc: Defer notification surface creation" (Closed)
Patch Set: Created 4 years, 3 months 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
1 // Copyright 2016 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef UI_ARC_NOTIFICATION_ARC_NOTIFICATION_MANAGER_H_ 5 #ifndef UI_ARC_NOTIFICATION_ARC_NOTIFICATION_MANAGER_H_
6 #define UI_ARC_NOTIFICATION_ARC_NOTIFICATION_MANAGER_H_ 6 #define UI_ARC_NOTIFICATION_ARC_NOTIFICATION_MANAGER_H_
7 7
8 #include <string> 8 #include <string>
9 #include <unordered_map> 9 #include <unordered_map>
10 10
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 void OnNotificationPosted(mojom::ArcNotificationDataPtr data) override; 42 void OnNotificationPosted(mojom::ArcNotificationDataPtr data) override;
43 void OnNotificationRemoved(const mojo::String& key) override; 43 void OnNotificationRemoved(const mojo::String& key) override;
44 void OnToastPosted(mojom::ArcToastDataPtr data) override; 44 void OnToastPosted(mojom::ArcToastDataPtr data) override;
45 void OnToastCancelled(mojom::ArcToastDataPtr data) override; 45 void OnToastCancelled(mojom::ArcToastDataPtr data) override;
46 46
47 // Methods called from ArcNotificationItem: 47 // Methods called from ArcNotificationItem:
48 void SendNotificationRemovedFromChrome(const std::string& key); 48 void SendNotificationRemovedFromChrome(const std::string& key);
49 void SendNotificationClickedOnChrome(const std::string& key); 49 void SendNotificationClickedOnChrome(const std::string& key);
50 void SendNotificationButtonClickedOnChrome(const std::string& key, 50 void SendNotificationButtonClickedOnChrome(const std::string& key,
51 int button_index); 51 int button_index);
52 void CreateNotificationWindow(const std::string& key);
53 void CloseNotificationWindow(const std::string& key);
52 54
53 private: 55 private:
54 const AccountId main_profile_id_; 56 const AccountId main_profile_id_;
55 message_center::MessageCenter* const message_center_; 57 message_center::MessageCenter* const message_center_;
56 58
57 using ItemMap = 59 using ItemMap =
58 std::unordered_map<std::string, std::unique_ptr<ArcNotificationItem>>; 60 std::unordered_map<std::string, std::unique_ptr<ArcNotificationItem>>;
59 ItemMap items_; 61 ItemMap items_;
60 62
61 bool ready_ = false; 63 bool ready_ = false;
62 64
63 mojo::Binding<arc::mojom::NotificationsHost> binding_; 65 mojo::Binding<arc::mojom::NotificationsHost> binding_;
64 66
65 DISALLOW_COPY_AND_ASSIGN(ArcNotificationManager); 67 DISALLOW_COPY_AND_ASSIGN(ArcNotificationManager);
66 }; 68 };
67 69
68 } // namespace arc 70 } // namespace arc
69 71
70 #endif // UI_ARC_NOTIFICATION_ARC_NOTIFICATION_MANAGER_H_ 72 #endif // UI_ARC_NOTIFICATION_ARC_NOTIFICATION_MANAGER_H_
OLDNEW
« no previous file with comments | « ui/arc/notification/arc_notification_item.h ('k') | ui/arc/notification/arc_notification_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698