| OLD | NEW |
| 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 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 bool GetDisplayed(const std::string& profile_id, |
| 73 bool incognito, | 73 bool incognito, |
| 74 std::set<std::string>* notifications) const override; | 74 std::set<std::string>* notifications) const override; |
| 75 void GetDisplayedAsync(const std::string& profile_id, |
| 76 bool incognito, |
| 77 const NotificationCommon::NotificationResultCallback& |
| 78 callback) const override; |
| 75 | 79 |
| 76 static bool RegisterNotificationPlatformBridge(JNIEnv* env); | 80 static bool RegisterNotificationPlatformBridge(JNIEnv* env); |
| 77 | 81 |
| 78 static void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry); | 82 static void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry); |
| 79 | 83 |
| 80 private: | 84 private: |
| 81 // Contains information necessary in order to enable closing notifications | 85 // Contains information necessary in order to enable closing notifications |
| 82 // that were not created by this instance of the manager. This list may not | 86 // 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 | 87 // contain the notifications that have not been interacted with since the last |
| 84 // restart of Chrome. | 88 // restart of Chrome. |
| (...skipping 14 matching lines...) Expand all Loading... |
| 99 // notifications are created by the content/ layer. | 103 // notifications are created by the content/ layer. |
| 100 std::map<std::string, RegeneratedNotificationInfo> | 104 std::map<std::string, RegeneratedNotificationInfo> |
| 101 regenerated_notification_infos_; | 105 regenerated_notification_infos_; |
| 102 | 106 |
| 103 base::android::ScopedJavaGlobalRef<jobject> java_object_; | 107 base::android::ScopedJavaGlobalRef<jobject> java_object_; |
| 104 | 108 |
| 105 DISALLOW_COPY_AND_ASSIGN(NotificationPlatformBridgeAndroid); | 109 DISALLOW_COPY_AND_ASSIGN(NotificationPlatformBridgeAndroid); |
| 106 }; | 110 }; |
| 107 | 111 |
| 108 #endif // CHROME_BROWSER_NOTIFICATIONS_NOTIFICATION_PLATFORM_BRIDGE_ANDROID_H_ | 112 #endif // CHROME_BROWSER_NOTIFICATIONS_NOTIFICATION_PLATFORM_BRIDGE_ANDROID_H_ |
| OLD | NEW |