OLD | NEW |
(Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef CHROME_BROWSER_PUSH_MESSAGING_PUSH_MESSAGING_SERVICE_IMPL_H_ |
| 6 #define CHROME_BROWSER_PUSH_MESSAGING_PUSH_MESSAGING_SERVICE_IMPL_H_ |
| 7 |
| 8 #include "content/public/browser/push_messaging_service.h" |
| 9 #include "base/compiler_specific.h" |
| 10 #include "google_apis/gcm/gcm_client.h" |
| 11 |
| 12 class Profile; |
| 13 |
| 14 class PushMessagingServiceImpl |
| 15 : public base::RefCounted<PushMessagingServiceImpl>, |
| 16 public content::PushMessagingService { |
| 17 public: |
| 18 explicit PushMessagingServiceImpl(Profile* profile); |
| 19 virtual ~PushMessagingServiceImpl(); |
| 20 |
| 21 virtual void Register(content::PushMessagingService::RegisterCallback) |
| 22 OVERRIDE; |
| 23 |
| 24 void DidRegister(content::PushMessagingService::RegisterCallback callback, |
| 25 const std::string& registration_id, |
| 26 gcm::GCMClient::Result result); |
| 27 |
| 28 private: |
| 29 content::PushMessagingStatus FromGCMClientResult(gcm::GCMClient::Result); |
| 30 |
| 31 Profile* profile_; |
| 32 }; |
| 33 |
| 34 #endif // CHROME_BROWSER_PUSH_MESSAGING_PUSH_MESSAGING_SERVICE_IMPL_H_ |
OLD | NEW |