Chromium Code Reviews| 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 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 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 |
|
Peter Beverloo
2017/03/15 18:07:50
nit: drop the blank line (comment on line 64 appli
Miguel Garcia
2017/03/16 14:57:42
Done.
| |
| 73 void GetDisplayed(const std::string& profile_id, | |
| 73 bool incognito, | 74 bool incognito, |
| 74 std::set<std::string>* notifications) const override; | 75 const NotificationResultCallback& 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 Loading... | |
| 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_ |
| OLD | NEW |