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

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

Issue 2749453002: Make GetDisplayedNotifications asynchronous. (Closed)
Patch Set: review Created 3 years, 9 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_PLATFORM_BRIDGE_ANDROID_H_ 5 #ifndef CHROME_BROWSER_NOTIFICATIONS_NOTIFICATION_PLATFORM_BRIDGE_ANDROID_H_
6 #define CHROME_BROWSER_NOTIFICATIONS_NOTIFICATION_PLATFORM_BRIDGE_ANDROID_H_ 6 #define CHROME_BROWSER_NOTIFICATIONS_NOTIFICATION_PLATFORM_BRIDGE_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 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 jboolean by_user); 62 jboolean by_user);
63 63
64 // NotificationPlatformBridge implementation. 64 // NotificationPlatformBridge implementation.
65 void Display(NotificationCommon::Type notification_type, 65 void Display(NotificationCommon::Type notification_type,
66 const std::string& notification_id, 66 const std::string& notification_id,
67 const std::string& profile_id, 67 const std::string& profile_id,
68 bool incognito, 68 bool incognito,
69 const Notification& notification) override; 69 const Notification& notification) override;
70 void Close(const std::string& profile_id, 70 void Close(const std::string& profile_id,
71 const std::string& notification_id) override; 71 const std::string& notification_id) override;
72 bool GetDisplayed(const std::string& profile_id, 72 void GetDisplayed(
73 bool incognito, 73 const std::string& profile_id,
74 std::set<std::string>* notifications) const override; 74 bool incognito,
75 const DisplayedNotificationsCallback& callback) const override;
75 76
76 static bool RegisterNotificationPlatformBridge(JNIEnv* env); 77 static bool RegisterNotificationPlatformBridge(JNIEnv* env);
77 78
78 static void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry); 79 static void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry);
79 80
80 private: 81 private:
81 // Contains information necessary in order to enable closing notifications 82 // Contains information necessary in order to enable closing notifications
82 // that were not created by this instance of the manager. This list may not 83 // that were not created by this instance of the manager. This list may not
83 // contain the notifications that have not been interacted with since the last 84 // contain the notifications that have not been interacted with since the last
84 // restart of Chrome. 85 // restart of Chrome.
(...skipping 14 matching lines...) Expand all
99 // notifications are created by the content/ layer. 100 // notifications are created by the content/ layer.
100 std::map<std::string, RegeneratedNotificationInfo> 101 std::map<std::string, RegeneratedNotificationInfo>
101 regenerated_notification_infos_; 102 regenerated_notification_infos_;
102 103
103 base::android::ScopedJavaGlobalRef<jobject> java_object_; 104 base::android::ScopedJavaGlobalRef<jobject> java_object_;
104 105
105 DISALLOW_COPY_AND_ASSIGN(NotificationPlatformBridgeAndroid); 106 DISALLOW_COPY_AND_ASSIGN(NotificationPlatformBridgeAndroid);
106 }; 107 };
107 108
108 #endif // CHROME_BROWSER_NOTIFICATIONS_NOTIFICATION_PLATFORM_BRIDGE_ANDROID_H_ 109 #endif // CHROME_BROWSER_NOTIFICATIONS_NOTIFICATION_PLATFORM_BRIDGE_ANDROID_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698