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

Unified Diff: chrome/browser/services/gcm/push_messaging_service_impl.h

Issue 340773006: Dispatch push event to worker from PushServiceImpl#OnMessage. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Debugging. Created 6 years, 6 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
Index: chrome/browser/services/gcm/push_messaging_service_impl.h
diff --git a/chrome/browser/services/gcm/push_messaging_service_impl.h b/chrome/browser/services/gcm/push_messaging_service_impl.h
index aea8a08edf8321f1cd0a9d2d449892652b891164..b507f78436d4377cea6d4a2a61f4092a82f326ef 100644
--- a/chrome/browser/services/gcm/push_messaging_service_impl.h
+++ b/chrome/browser/services/gcm/push_messaging_service_impl.h
@@ -6,17 +6,26 @@
#define CHROME_BROWSER_SERVICES_GCM_PUSH_MESSAGING_SERVICE_IMPL_H_
#include "base/compiler_specific.h"
+#include "base/memory/ref_counted.h"
#include "base/memory/weak_ptr.h"
#include "components/gcm_driver/gcm_app_handler.h"
#include "components/gcm_driver/gcm_client.h"
+#include "content/common/service_worker/service_worker_status_code.h"
#include "content/public/browser/push_messaging_service.h"
+using content::ServiceWorkerStatusCode;
+
class Profile;
namespace user_prefs {
class PrefRegistrySyncable;
}
+namespace content {
+struct PushMessagingApplicationId;
+class ServiceWorkerContextWrapper;
+}
+
namespace gcm {
class GCMProfileService;
@@ -56,6 +65,11 @@ class PushMessagingServiceImpl : public content::PushMessagingService,
const content::PushMessagingService::RegisterCallback& callback,
const std::string& registration_id,
GCMClient::Result result);
+ void SendMessage(
+ const content::PushMessagingApplicationId& id,
+ const std::string& data,
+ scoped_refptr<content::ServiceWorkerContextWrapper> worker_context);
+ void SendMessageCallback(content::ServiceWorkerStatusCode status);
GCMProfileService* gcm_profile_service_; // It owns us.

Powered by Google App Engine
This is Rietveld 408576698