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