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

Unified Diff: chrome/browser/push_messaging/push_messaging_service_impl.h

Issue 1099093003: Push API: Forced notifications should use Notifications database (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address Peter's review nits Created 5 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/push_messaging/push_messaging_service_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/push_messaging/push_messaging_service_impl.h
diff --git a/chrome/browser/push_messaging/push_messaging_service_impl.h b/chrome/browser/push_messaging/push_messaging_service_impl.h
index 2a4ed65949c8c60b9d7a6d8a28ce525a790e448e..1c6370e34ba8790e3b686294dab13c88b7210d21 100644
--- a/chrome/browser/push_messaging/push_messaging_service_impl.h
+++ b/chrome/browser/push_messaging/push_messaging_service_impl.h
@@ -5,6 +5,8 @@
#ifndef CHROME_BROWSER_PUSH_MESSAGING_PUSH_MESSAGING_SERVICE_IMPL_H_
#define CHROME_BROWSER_PUSH_MESSAGING_PUSH_MESSAGING_SERVICE_IMPL_H_
+#include <stdint.h>
+
#include "base/callback.h"
#include "base/compiler_specific.h"
#include "base/memory/weak_ptr.h"
@@ -20,8 +22,9 @@
class Profile;
class PushMessagingApplicationId;
-namespace user_prefs {
-class PrefRegistrySyncable;
+namespace content {
+struct NotificationDatabaseData;
+struct PlatformNotificationData;
}
namespace gcm {
@@ -29,6 +32,10 @@ class GCMDriver;
class GCMProfileService;
}
+namespace user_prefs {
+class PrefRegistrySyncable;
+}
+
class PushMessagingServiceImpl : public content::PushMessagingService,
public gcm::GCMAppHandler,
public content_settings::Observer,
@@ -113,11 +120,27 @@ class PushMessagingServiceImpl : public content::PushMessagingService,
// happened in the background. When they forget to do so, display a default
// notification on their behalf.
void RequireUserVisibleUX(const GURL& requesting_origin,
- int64 service_worker_registration_id,
+ int64_t service_worker_registration_id,
const base::Closure& message_handled_closure);
- void DidGetNotificationsShown(
+
+ static void DidGetNotificationsFromDatabaseIOProxy(
+ const base::WeakPtr<PushMessagingServiceImpl>& ui_weak_ptr,
const GURL& requesting_origin,
- int64 service_worker_registration_id,
+ int64_t service_worker_registration_id,
+ const base::Closure& message_handled_closure,
+ bool success,
+ const std::vector<content::NotificationDatabaseData>& data);
+
+ void DidGetNotificationsFromDatabase(
+ const GURL& requesting_origin,
+ int64_t service_worker_registration_id,
+ const base::Closure& message_handled_closure,
+ bool success,
+ const std::vector<content::NotificationDatabaseData>& data);
+
+ void DidGetNotificationsShownAndNeeded(
+ const GURL& requesting_origin,
+ int64_t service_worker_registration_id,
bool notification_shown,
bool notification_needed,
const base::Closure& message_handled_closure,
@@ -125,6 +148,21 @@ class PushMessagingServiceImpl : public content::PushMessagingService,
bool success,
bool not_found);
+ static void DidWriteNotificationDataIOProxy(
+ const base::WeakPtr<PushMessagingServiceImpl>& ui_weak_ptr,
+ const GURL& requesting_origin,
+ const content::PlatformNotificationData& notification_data,
+ const base::Closure& message_handled_closure,
+ bool success,
+ int64_t persistent_notification_id);
+
+ void DidWriteNotificationData(
+ const GURL& requesting_origin,
+ const content::PlatformNotificationData& notification_data,
+ const base::Closure& message_handled_closure,
+ bool success,
+ int64_t persistent_notification_id);
+
// Register methods ----------------------------------------------------------
void RegisterEnd(
« no previous file with comments | « no previous file | chrome/browser/push_messaging/push_messaging_service_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698