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 #include "chrome/browser/notifications/notification_platform_bridge_android.h" | 5 #include "chrome/browser/notifications/notification_platform_bridge_android.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/android/jni_array.h" | 10 #include "base/android/jni_array.h" |
(...skipping 297 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
308 regenerated_notification_infos_.erase(iterator); | 308 regenerated_notification_infos_.erase(iterator); |
309 | 309 |
310 Java_NotificationPlatformBridge_closeNotification( | 310 Java_NotificationPlatformBridge_closeNotification( |
311 env, java_object_, j_profile_id, j_notification_id, origin, tag, | 311 env, java_object_, j_profile_id, j_notification_id, origin, tag, |
312 webapk_package); | 312 webapk_package); |
313 } | 313 } |
314 | 314 |
315 void NotificationPlatformBridgeAndroid::GetDisplayed( | 315 void NotificationPlatformBridgeAndroid::GetDisplayed( |
316 const std::string& profile_id, | 316 const std::string& profile_id, |
317 bool incognito, | 317 bool incognito, |
318 const DisplayedNotificationsCallback& callback) const { | 318 const GetDisplayedNotificationsCallback& callback) const { |
319 auto displayed_notifications = base::MakeUnique<std::set<std::string>>(); | 319 auto displayed_notifications = base::MakeUnique<std::set<std::string>>(); |
320 content::BrowserThread::PostTask( | 320 content::BrowserThread::PostTask( |
321 content::BrowserThread::UI, FROM_HERE, | 321 content::BrowserThread::UI, FROM_HERE, |
322 base::Bind(callback, base::Passed(&displayed_notifications), | 322 base::Bind(callback, base::Passed(&displayed_notifications), |
323 false /* supports_synchronization */)); | 323 false /* supports_synchronization */)); |
324 } | 324 } |
325 | 325 |
326 // static | 326 // static |
327 bool NotificationPlatformBridgeAndroid::RegisterNotificationPlatformBridge( | 327 bool NotificationPlatformBridgeAndroid::RegisterNotificationPlatformBridge( |
328 JNIEnv* env) { | 328 JNIEnv* env) { |
(...skipping 10 matching lines...) Expand all Loading... |
339 RegeneratedNotificationInfo() {} | 339 RegeneratedNotificationInfo() {} |
340 | 340 |
341 NotificationPlatformBridgeAndroid::RegeneratedNotificationInfo:: | 341 NotificationPlatformBridgeAndroid::RegeneratedNotificationInfo:: |
342 RegeneratedNotificationInfo(const std::string& origin, | 342 RegeneratedNotificationInfo(const std::string& origin, |
343 const std::string& tag, | 343 const std::string& tag, |
344 const std::string& webapk_package) | 344 const std::string& webapk_package) |
345 : origin(origin), tag(tag), webapk_package(webapk_package) {} | 345 : origin(origin), tag(tag), webapk_package(webapk_package) {} |
346 | 346 |
347 NotificationPlatformBridgeAndroid::RegeneratedNotificationInfo:: | 347 NotificationPlatformBridgeAndroid::RegeneratedNotificationInfo:: |
348 ~RegeneratedNotificationInfo() {} | 348 ~RegeneratedNotificationInfo() {} |
OLD | NEW |