| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CHROME_BROWSER_SERVICES_GCM_PUSH_MESSAGING_SERVICE_IMPL_H_ | 5 #ifndef CHROME_BROWSER_SERVICES_GCM_PUSH_MESSAGING_SERVICE_IMPL_H_ |
| 6 #define CHROME_BROWSER_SERVICES_GCM_PUSH_MESSAGING_SERVICE_IMPL_H_ | 6 #define CHROME_BROWSER_SERVICES_GCM_PUSH_MESSAGING_SERVICE_IMPL_H_ |
| 7 | 7 |
| 8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
| 9 #include "base/memory/weak_ptr.h" | 9 #include "base/memory/weak_ptr.h" |
| 10 #include "components/gcm_driver/gcm_app_handler.h" | 10 #include "components/gcm_driver/gcm_app_handler.h" |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 51 // content::PushMessagingService implementation: | 51 // content::PushMessagingService implementation: |
| 52 virtual void Register( | 52 virtual void Register( |
| 53 const GURL& origin, | 53 const GURL& origin, |
| 54 int64 service_worker_registration_id, | 54 int64 service_worker_registration_id, |
| 55 const std::string& sender_id, | 55 const std::string& sender_id, |
| 56 int renderer_id, | 56 int renderer_id, |
| 57 int render_frame_id, | 57 int render_frame_id, |
| 58 bool user_gesture, | 58 bool user_gesture, |
| 59 const content::PushMessagingService::RegisterCallback& callback) override; | 59 const content::PushMessagingService::RegisterCallback& callback) override; |
| 60 | 60 |
| 61 void SetProfileForTesting(Profile* profile); |
| 62 |
| 61 private: | 63 private: |
| 62 void DeliverMessageCallback(const PushMessagingApplicationId& application_id, | 64 void DeliverMessageCallback(const PushMessagingApplicationId& application_id, |
| 63 const GCMClient::IncomingMessage& message, | 65 const GCMClient::IncomingMessage& message, |
| 64 content::PushMessagingStatus status); | 66 content::PushMessagingStatus status); |
| 65 | 67 |
| 66 void RegisterEnd( | 68 void RegisterEnd( |
| 67 const content::PushMessagingService::RegisterCallback& callback, | 69 const content::PushMessagingService::RegisterCallback& callback, |
| 68 const std::string& registration_id, | 70 const std::string& registration_id, |
| 69 content::PushMessagingStatus status); | 71 content::PushMessagingStatus status); |
| 70 | 72 |
| (...skipping 13 matching lines...) Expand all Loading... |
| 84 Profile* profile_; // It owns our owner. | 86 Profile* profile_; // It owns our owner. |
| 85 | 87 |
| 86 base::WeakPtrFactory<PushMessagingServiceImpl> weak_factory_; | 88 base::WeakPtrFactory<PushMessagingServiceImpl> weak_factory_; |
| 87 | 89 |
| 88 DISALLOW_COPY_AND_ASSIGN(PushMessagingServiceImpl); | 90 DISALLOW_COPY_AND_ASSIGN(PushMessagingServiceImpl); |
| 89 }; | 91 }; |
| 90 | 92 |
| 91 } // namespace gcm | 93 } // namespace gcm |
| 92 | 94 |
| 93 #endif // CHROME_BROWSER_SERVICES_GCM_PUSH_MESSAGING_SERVICE_IMPL_H_ | 95 #endif // CHROME_BROWSER_SERVICES_GCM_PUSH_MESSAGING_SERVICE_IMPL_H_ |
| OLD | NEW |