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

Side by Side Diff: chrome/browser/push_messaging/push_messaging_service_impl.h

Issue 1770763003: Revert of Partial implementation of subscription restrictions. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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 unified diff | Download patch
OLDNEW
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_PUSH_MESSAGING_PUSH_MESSAGING_SERVICE_IMPL_H_ 5 #ifndef CHROME_BROWSER_PUSH_MESSAGING_PUSH_MESSAGING_SERVICE_IMPL_H_
6 #define CHROME_BROWSER_PUSH_MESSAGING_PUSH_MESSAGING_SERVICE_IMPL_H_ 6 #define CHROME_BROWSER_PUSH_MESSAGING_PUSH_MESSAGING_SERVICE_IMPL_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 #include <set> 9 #include <set>
10 #include <vector> 10 #include <vector>
(...skipping 17 matching lines...) Expand all
28 #include "content/public/common/push_messaging_status.h" 28 #include "content/public/common/push_messaging_status.h"
29 #include "third_party/WebKit/public/platform/modules/push_messaging/WebPushPermi ssionStatus.h" 29 #include "third_party/WebKit/public/platform/modules/push_messaging/WebPushPermi ssionStatus.h"
30 30
31 #if defined(ENABLE_NOTIFICATIONS) 31 #if defined(ENABLE_NOTIFICATIONS)
32 #include "chrome/browser/push_messaging/push_messaging_notification_manager.h" 32 #include "chrome/browser/push_messaging/push_messaging_notification_manager.h"
33 #endif 33 #endif
34 34
35 class Profile; 35 class Profile;
36 class PushMessagingAppIdentifier; 36 class PushMessagingAppIdentifier;
37 class PushMessagingServiceObserver; 37 class PushMessagingServiceObserver;
38 struct PushSubscriptionOptions;
39 38
40 namespace gcm { 39 namespace gcm {
41 class GCMDriver; 40 class GCMDriver;
42 class GCMProfileService; 41 class GCMProfileService;
43 } 42 }
44 43
45 namespace user_prefs { 44 namespace user_prefs {
46 class PrefRegistrySyncable; 45 class PrefRegistrySyncable;
47 } 46 }
48 47
(...skipping 19 matching lines...) Expand all
68 const gcm::GCMClient::SendErrorDetails& send_error_details) override; 67 const gcm::GCMClient::SendErrorDetails& send_error_details) override;
69 void OnSendAcknowledged(const std::string& app_id, 68 void OnSendAcknowledged(const std::string& app_id,
70 const std::string& message_id) override; 69 const std::string& message_id) override;
71 bool CanHandle(const std::string& app_id) const override; 70 bool CanHandle(const std::string& app_id) const override;
72 71
73 // content::PushMessagingService implementation: 72 // content::PushMessagingService implementation:
74 GURL GetPushEndpoint() override; 73 GURL GetPushEndpoint() override;
75 void SubscribeFromDocument( 74 void SubscribeFromDocument(
76 const GURL& requesting_origin, 75 const GURL& requesting_origin,
77 int64_t service_worker_registration_id, 76 int64_t service_worker_registration_id,
77 const std::string& sender_id,
78 int renderer_id, 78 int renderer_id,
79 int render_frame_id, 79 int render_frame_id,
80 const content::PushSubscriptionOptions& options, 80 bool user_visible,
81 const content::PushMessagingService::RegisterCallback& callback) override; 81 const content::PushMessagingService::RegisterCallback& callback) override;
82 void SubscribeFromWorker( 82 void SubscribeFromWorker(
83 const GURL& requesting_origin, 83 const GURL& requesting_origin,
84 int64_t service_worker_registration_id, 84 int64_t service_worker_registration_id,
85 const content::PushSubscriptionOptions& options, 85 const std::string& sender_id,
86 bool user_visible,
86 const content::PushMessagingService::RegisterCallback& callback) override; 87 const content::PushMessagingService::RegisterCallback& callback) override;
87 void GetEncryptionInfo( 88 void GetEncryptionInfo(
88 const GURL& origin, 89 const GURL& origin,
89 int64_t service_worker_registration_id, 90 int64_t service_worker_registration_id,
90 const content::PushMessagingService::EncryptionInfoCallback& callback) 91 const content::PushMessagingService::EncryptionInfoCallback& callback)
91 override; 92 override;
92 void Unsubscribe( 93 void Unsubscribe(
93 const GURL& requesting_origin, 94 const GURL& requesting_origin,
94 int64_t service_worker_registration_id, 95 int64_t service_worker_registration_id,
95 const std::string& sender_id, 96 const std::string& sender_id,
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
157 158
158 void DidSubscribeWithEncryptionInfo( 159 void DidSubscribeWithEncryptionInfo(
159 const PushMessagingAppIdentifier& app_identifier, 160 const PushMessagingAppIdentifier& app_identifier,
160 const content::PushMessagingService::RegisterCallback& callback, 161 const content::PushMessagingService::RegisterCallback& callback,
161 const std::string& subscription_id, 162 const std::string& subscription_id,
162 const std::string& p256dh, 163 const std::string& p256dh,
163 const std::string& auth_secret); 164 const std::string& auth_secret);
164 165
165 void DidRequestPermission( 166 void DidRequestPermission(
166 const PushMessagingAppIdentifier& app_identifier, 167 const PushMessagingAppIdentifier& app_identifier,
167 const content::PushSubscriptionOptions& options, 168 const std::string& sender_id,
168 const content::PushMessagingService::RegisterCallback& callback, 169 const content::PushMessagingService::RegisterCallback& callback,
169 content::PermissionStatus permission_status); 170 content::PermissionStatus permission_status);
170 171
171 // GetEncryptionInfo method -------------------------------------------------- 172 // GetEncryptionInfo method --------------------------------------------------
172 173
173 void DidGetEncryptionInfo( 174 void DidGetEncryptionInfo(
174 const PushMessagingService::EncryptionInfoCallback& callback, 175 const PushMessagingService::EncryptionInfoCallback& callback,
175 const std::string& p256dh, 176 const std::string& p256dh,
176 const std::string& auth_secret) const; 177 const std::string& auth_secret) const;
177 178
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
235 MessageDispatchedCallback message_dispatched_callback_for_testing_; 236 MessageDispatchedCallback message_dispatched_callback_for_testing_;
236 237
237 scoped_ptr<PushMessagingServiceObserver> push_messaging_service_observer_; 238 scoped_ptr<PushMessagingServiceObserver> push_messaging_service_observer_;
238 239
239 base::WeakPtrFactory<PushMessagingServiceImpl> weak_factory_; 240 base::WeakPtrFactory<PushMessagingServiceImpl> weak_factory_;
240 241
241 DISALLOW_COPY_AND_ASSIGN(PushMessagingServiceImpl); 242 DISALLOW_COPY_AND_ASSIGN(PushMessagingServiceImpl);
242 }; 243 };
243 244
244 #endif // CHROME_BROWSER_PUSH_MESSAGING_PUSH_MESSAGING_SERVICE_IMPL_H_ 245 #endif // CHROME_BROWSER_PUSH_MESSAGING_PUSH_MESSAGING_SERVICE_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698