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

Side by Side Diff: content/child/push_messaging/push_provider.h

Issue 1154303003: Move push endpoint concatenation up to the browser process. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 5 years, 6 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 CONTENT_CHILD_PUSH_MESSAGING_PUSH_PROVIDER_H_ 5 #ifndef CONTENT_CHILD_PUSH_MESSAGING_PUSH_PROVIDER_H_
6 #define CONTENT_CHILD_PUSH_MESSAGING_PUSH_PROVIDER_H_ 6 #define CONTENT_CHILD_PUSH_MESSAGING_PUSH_PROVIDER_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/id_map.h" 10 #include "base/id_map.h"
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 57
58 // Called by the PushDispatcher. 58 // Called by the PushDispatcher.
59 bool OnMessageReceived(const IPC::Message& message); 59 bool OnMessageReceived(const IPC::Message& message);
60 60
61 private: 61 private:
62 PushProvider(ThreadSafeSender* thread_safe_sender, 62 PushProvider(ThreadSafeSender* thread_safe_sender,
63 PushDispatcher* push_dispatcher); 63 PushDispatcher* push_dispatcher);
64 64
65 // IPC message handlers. 65 // IPC message handlers.
66 void OnSubscribeFromWorkerSuccess(int request_id, 66 void OnSubscribeFromWorkerSuccess(int request_id,
67 const GURL& endpoint, 67 const GURL& endpoint);
68 const std::string& subscription_id);
69 void OnSubscribeFromWorkerError(int request_id, 68 void OnSubscribeFromWorkerError(int request_id,
70 PushRegistrationStatus status); 69 PushRegistrationStatus status);
71 void OnUnsubscribeSuccess(int request_id, bool did_unsubscribe); 70 void OnUnsubscribeSuccess(int request_id, bool did_unsubscribe);
72 void OnUnsubscribeError(int request_id, 71 void OnUnsubscribeError(int request_id,
73 blink::WebPushError::ErrorType error_type, 72 blink::WebPushError::ErrorType error_type,
74 const std::string& error_message); 73 const std::string& error_message);
75 void OnGetRegistrationSuccess(int request_id, 74 void OnGetRegistrationSuccess(int request_id,
76 const GURL& endpoint, 75 const GURL& endpoint);
77 const std::string& registration_id);
78 void OnGetRegistrationError(int request_id, PushGetRegistrationStatus status); 76 void OnGetRegistrationError(int request_id, PushGetRegistrationStatus status);
79 void OnGetPermissionStatusSuccess(int request_id, 77 void OnGetPermissionStatusSuccess(int request_id,
80 blink::WebPushPermissionStatus status); 78 blink::WebPushPermissionStatus status);
81 void OnGetPermissionStatusError(int request_id, 79 void OnGetPermissionStatusError(int request_id,
82 blink::WebPushError::ErrorType error); 80 blink::WebPushError::ErrorType error);
83 81
84 scoped_refptr<ThreadSafeSender> thread_safe_sender_; 82 scoped_refptr<ThreadSafeSender> thread_safe_sender_;
85 scoped_refptr<PushDispatcher> push_dispatcher_; 83 scoped_refptr<PushDispatcher> push_dispatcher_;
86 84
87 // Stores the subscription callbacks with their request ids. This class owns 85 // Stores the subscription callbacks with their request ids. This class owns
(...skipping 10 matching lines...) Expand all
98 // the callbacks. 96 // the callbacks.
99 IDMap<blink::WebPushUnsubscribeCallbacks, IDMapOwnPointer> 97 IDMap<blink::WebPushUnsubscribeCallbacks, IDMapOwnPointer>
100 unsubscribe_callbacks_; 98 unsubscribe_callbacks_;
101 99
102 DISALLOW_COPY_AND_ASSIGN(PushProvider); 100 DISALLOW_COPY_AND_ASSIGN(PushProvider);
103 }; 101 };
104 102
105 } // namespace content 103 } // namespace content
106 104
107 #endif // CONTENT_CHILD_PUSH_MESSAGING_PUSH_PROVIDER_H_ 105 #endif // CONTENT_CHILD_PUSH_MESSAGING_PUSH_PROVIDER_H_
OLDNEW
« no previous file with comments | « content/browser/push_messaging/push_messaging_message_filter.cc ('k') | content/child/push_messaging/push_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698