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

Side by Side Diff: chrome/browser/notifications/notification_ui_manager_android.h

Issue 1509923002: Implement native web notifications for mac (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 11 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 CHROME_BROWSER_NOTIFICATIONS_NOTIFICATION_UI_MANAGER_ANDROID_H_ 5 #ifndef CHROME_BROWSER_NOTIFICATIONS_NOTIFICATION_UI_MANAGER_ANDROID_H_
6 #define CHROME_BROWSER_NOTIFICATIONS_NOTIFICATION_UI_MANAGER_ANDROID_H_ 6 #define CHROME_BROWSER_NOTIFICATIONS_NOTIFICATION_UI_MANAGER_ANDROID_H_
7 7
8 #include <jni.h> 8 #include <jni.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 #include <map> 10 #include <map>
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 ProfileID profile_id) const override; 61 ProfileID profile_id) const override;
62 bool CancelById(const std::string& delegate_id, 62 bool CancelById(const std::string& delegate_id,
63 ProfileID profile_id) override; 63 ProfileID profile_id) override;
64 std::set<std::string> GetAllIdsByProfileAndSourceOrigin( 64 std::set<std::string> GetAllIdsByProfileAndSourceOrigin(
65 ProfileID profile_id, 65 ProfileID profile_id,
66 const GURL& source) override; 66 const GURL& source) override;
67 std::set<std::string> GetAllIdsByProfile(ProfileID profile_id) override; 67 std::set<std::string> GetAllIdsByProfile(ProfileID profile_id) override;
68 bool CancelAllBySourceOrigin(const GURL& source_origin) override; 68 bool CancelAllBySourceOrigin(const GURL& source_origin) override;
69 bool CancelAllByProfile(ProfileID profile_id) override; 69 bool CancelAllByProfile(ProfileID profile_id) override;
70 void CancelAll() override; 70 void CancelAll() override;
71 bool AcceptNativeNotifications() override;
71 72
72 static bool RegisterNotificationUIManager(JNIEnv* env); 73 static bool RegisterNotificationUIManager(JNIEnv* env);
73 74
74 private: 75 private:
75 // Pair containing the information necessary in order to enable closing 76 // Pair containing the information necessary in order to enable closing
76 // notifications that were not created by this instance of the manager: the 77 // notifications that were not created by this instance of the manager: the
77 // notification's origin and tag. This list may not contain the notifications 78 // notification's origin and tag. This list may not contain the notifications
78 // that have not been interacted with since the last restart of Chrome. 79 // that have not been interacted with since the last restart of Chrome.
79 using RegeneratedNotificationInfo = std::pair<std::string, std::string>; 80 using RegeneratedNotificationInfo = std::pair<std::string, std::string>;
80 81
81 // Mapping of a persistent notification id to renegerated notification info. 82 // Mapping of a persistent notification id to renegerated notification info.
82 // TODO(peter): Remove this map once notification delegate ids for Web 83 // TODO(peter): Remove this map once notification delegate ids for Web
83 // notifications are created by the content/ layer. 84 // notifications are created by the content/ layer.
84 std::map<int64_t, RegeneratedNotificationInfo> 85 std::map<int64_t, RegeneratedNotificationInfo>
85 regenerated_notification_infos_; 86 regenerated_notification_infos_;
86 87
87 base::android::ScopedJavaGlobalRef<jobject> java_object_; 88 base::android::ScopedJavaGlobalRef<jobject> java_object_;
88 89
89 DISALLOW_COPY_AND_ASSIGN(NotificationUIManagerAndroid); 90 DISALLOW_COPY_AND_ASSIGN(NotificationUIManagerAndroid);
90 }; 91 };
91 92
92 #endif // CHROME_BROWSER_NOTIFICATIONS_NOTIFICATION_UI_MANAGER_ANDROID_H_ 93 #endif // CHROME_BROWSER_NOTIFICATIONS_NOTIFICATION_UI_MANAGER_ANDROID_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698