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

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

Issue 186023002: DO NOT REVIEW Plumb push messaging registration through to gcm. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. Created 6 years, 9 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 | « chrome/browser/push_messaging/OWNERS ('k') | 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
new file mode 100644
index 0000000000000000000000000000000000000000..805dd2c91e09d2f79581899a24928763b24a80c4
--- /dev/null
+++ b/chrome/browser/push_messaging/push_messaging_service_impl.h
@@ -0,0 +1,34 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CHROME_BROWSER_PUSH_MESSAGING_PUSH_MESSAGING_SERVICE_IMPL_H_
+#define CHROME_BROWSER_PUSH_MESSAGING_PUSH_MESSAGING_SERVICE_IMPL_H_
+
+#include "content/public/browser/push_messaging_service.h"
+#include "base/compiler_specific.h"
+#include "google_apis/gcm/gcm_client.h"
+
+class Profile;
+
+class PushMessagingServiceImpl
+ : public base::RefCounted<PushMessagingServiceImpl>,
+ public content::PushMessagingService {
+ public:
+ explicit PushMessagingServiceImpl(Profile* profile);
+ virtual ~PushMessagingServiceImpl();
+
+ virtual void Register(content::PushMessagingService::RegisterCallback)
+ OVERRIDE;
+
+ void DidRegister(content::PushMessagingService::RegisterCallback callback,
+ const std::string& registration_id,
+ gcm::GCMClient::Result result);
+
+ private:
+ content::PushMessagingStatus FromGCMClientResult(gcm::GCMClient::Result);
+
+ Profile* profile_;
+};
+
+#endif // CHROME_BROWSER_PUSH_MESSAGING_PUSH_MESSAGING_SERVICE_IMPL_H_
« no previous file with comments | « chrome/browser/push_messaging/OWNERS ('k') | chrome/browser/push_messaging/push_messaging_service_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698