Chromium Code Reviews| 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 |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..34a3605192d0bf5c395ddce972dfd2362a392bf9 |
| --- /dev/null |
| +++ b/chrome/browser/services/gcm/push_messaging_service_impl.h |
| @@ -0,0 +1,39 @@ |
| +// 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_SERVICES_GCM_PUSH_MESSAGING_SERVICE_IMPL_H_ |
| +#define CHROME_BROWSER_SERVICES_GCM_PUSH_MESSAGING_SERVICE_IMPL_H_ |
| + |
| +#include "base/compiler_specific.h" |
| +#include "content/public/browser/push_messaging_service.h" |
| +#include "google_apis/gcm/gcm_client.h" |
| + |
| +namespace gcm { |
| + |
| +class GCMProfileService; |
| + |
| +class PushMessagingServiceImpl : public content::PushMessagingService { |
|
jianli
2014/06/06 17:32:21
Please document what this class is for.
johnme
2014/06/06 18:48:25
Done.
|
| + public: |
| + explicit PushMessagingServiceImpl(GCMProfileService* gcm_profile_service); |
| + virtual ~PushMessagingServiceImpl(); |
| + |
| + virtual void Register( |
| + const std::string& app_id, |
| + const std::string& sender_id, |
| + const content::PushMessagingService::RegisterCallback& callback) OVERRIDE; |
| + |
| + void DidRegister( |
| + const content::PushMessagingService::RegisterCallback& callback, |
| + const std::string& registration_id, |
| + GCMClient::Result result); |
| + |
| + private: |
| + GCMProfileService* gcm_profile_service_; // It owns us. |
| + |
| + DISALLOW_COPY_AND_ASSIGN(PushMessagingServiceImpl); |
| +}; |
| + |
| +} // namespace gcm |
| + |
| +#endif // CHROME_BROWSER_SERVICES_GCM_PUSH_MESSAGING_SERVICE_IMPL_H_ |