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

Side by Side Diff: content/browser/service_worker/service_worker_dispatcher_host.h

Issue 1146913004: Service Worker: Add ServiceWorkerContainer.getRegistrations() method. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 7 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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_BROWSER_SERVICE_WORKER_SERVICE_WORKER_DISPATCHER_HOST_H_ 5 #ifndef CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_DISPATCHER_HOST_H_
6 #define CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_DISPATCHER_HOST_H_ 6 #define CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_DISPATCHER_HOST_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/id_map.h" 10 #include "base/id_map.h"
(...skipping 12 matching lines...) Expand all
23 class ResourceContext; 23 class ResourceContext;
24 class ServiceWorkerContextCore; 24 class ServiceWorkerContextCore;
25 class ServiceWorkerContextWrapper; 25 class ServiceWorkerContextWrapper;
26 class ServiceWorkerHandle; 26 class ServiceWorkerHandle;
27 class ServiceWorkerProviderHost; 27 class ServiceWorkerProviderHost;
28 class ServiceWorkerRegistration; 28 class ServiceWorkerRegistration;
29 class ServiceWorkerRegistrationHandle; 29 class ServiceWorkerRegistrationHandle;
30 class ServiceWorkerVersion; 30 class ServiceWorkerVersion;
31 struct ServiceWorkerObjectInfo; 31 struct ServiceWorkerObjectInfo;
32 struct ServiceWorkerRegistrationObjectInfo; 32 struct ServiceWorkerRegistrationObjectInfo;
33 struct ServiceWorkerRegistrationInfo;
33 struct ServiceWorkerVersionAttributes; 34 struct ServiceWorkerVersionAttributes;
34 struct TransferredMessagePort; 35 struct TransferredMessagePort;
35 36
36 class CONTENT_EXPORT ServiceWorkerDispatcherHost : public BrowserMessageFilter { 37 class CONTENT_EXPORT ServiceWorkerDispatcherHost : public BrowserMessageFilter {
37 public: 38 public:
38 ServiceWorkerDispatcherHost( 39 ServiceWorkerDispatcherHost(
39 int render_process_id, 40 int render_process_id,
40 MessagePortMessageFilter* message_port_message_filter, 41 MessagePortMessageFilter* message_port_message_filter,
41 ResourceContext* resource_context); 42 ResourceContext* resource_context);
42 43
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 const GURL& pattern, 89 const GURL& pattern,
89 const GURL& script_url); 90 const GURL& script_url);
90 void OnUnregisterServiceWorker(int thread_id, 91 void OnUnregisterServiceWorker(int thread_id,
91 int request_id, 92 int request_id,
92 int provider_id, 93 int provider_id,
93 const GURL& pattern); 94 const GURL& pattern);
94 void OnGetRegistration(int thread_id, 95 void OnGetRegistration(int thread_id,
95 int request_id, 96 int request_id,
96 int provider_id, 97 int provider_id,
97 const GURL& document_url); 98 const GURL& document_url);
99 void OnGetRegistrations(int thread_id,
100 int request_id,
101 int provider_id,
102 const GURL& document_url);
98 void OnGetRegistrationForReady(int thread_id, 103 void OnGetRegistrationForReady(int thread_id,
99 int request_id, 104 int request_id,
100 int provider_id); 105 int provider_id);
101 void OnProviderCreated(int provider_id, 106 void OnProviderCreated(int provider_id,
102 int render_frame_id, 107 int render_frame_id,
103 ServiceWorkerProviderType provider_type); 108 ServiceWorkerProviderType provider_type);
104 void OnProviderDestroyed(int provider_id); 109 void OnProviderDestroyed(int provider_id);
105 void OnSetHostedVersionId(int provider_id, int64 version_id); 110 void OnSetHostedVersionId(int provider_id, int64 version_id);
106 void OnWorkerReadyForInspection(int embedded_worker_id); 111 void OnWorkerReadyForInspection(int embedded_worker_id);
107 void OnWorkerScriptLoaded(int embedded_worker_id, 112 void OnWorkerScriptLoaded(int embedded_worker_id,
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
153 int request_id, 158 int request_id,
154 ServiceWorkerStatusCode status); 159 ServiceWorkerStatusCode status);
155 160
156 void GetRegistrationComplete( 161 void GetRegistrationComplete(
157 int thread_id, 162 int thread_id,
158 int provider_id, 163 int provider_id,
159 int request_id, 164 int request_id,
160 ServiceWorkerStatusCode status, 165 ServiceWorkerStatusCode status,
161 const scoped_refptr<ServiceWorkerRegistration>& registration); 166 const scoped_refptr<ServiceWorkerRegistration>& registration);
162 167
168 void GetRegistrationsComplete(
169 int thread_id,
170 int provider_id,
171 int request_id,
172 const std::vector<ServiceWorkerRegistrationInfo>& infos);
173
163 void GetRegistrationForReadyComplete( 174 void GetRegistrationForReadyComplete(
164 int thread_id, 175 int thread_id,
165 int request_id, 176 int request_id,
166 base::WeakPtr<ServiceWorkerProviderHost> provider_host, 177 base::WeakPtr<ServiceWorkerProviderHost> provider_host,
167 ServiceWorkerRegistration* registration); 178 ServiceWorkerRegistration* registration);
168 179
169 void SendRegistrationError(int thread_id, 180 void SendRegistrationError(int thread_id,
170 int request_id, 181 int request_id,
171 ServiceWorkerStatusCode status, 182 ServiceWorkerStatusCode status,
172 const std::string& status_message); 183 const std::string& status_message);
173 184
174 void SendUnregistrationError(int thread_id, 185 void SendUnregistrationError(int thread_id,
175 int request_id, 186 int request_id,
176 ServiceWorkerStatusCode status); 187 ServiceWorkerStatusCode status);
177 188
178 void SendGetRegistrationError(int thread_id, 189 void SendGetRegistrationError(int thread_id,
179 int request_id, 190 int request_id,
180 ServiceWorkerStatusCode status); 191 ServiceWorkerStatusCode status);
181 192
193 void SendGetRegistrationsError(int thread_id,
194 int request_id,
195 ServiceWorkerStatusCode status);
196
182 ServiceWorkerContextCore* GetContext(); 197 ServiceWorkerContextCore* GetContext();
183 198
184 int render_process_id_; 199 int render_process_id_;
185 MessagePortMessageFilter* const message_port_message_filter_; 200 MessagePortMessageFilter* const message_port_message_filter_;
186 ResourceContext* resource_context_; 201 ResourceContext* resource_context_;
187 scoped_refptr<ServiceWorkerContextWrapper> context_wrapper_; 202 scoped_refptr<ServiceWorkerContextWrapper> context_wrapper_;
188 203
189 IDMap<ServiceWorkerHandle, IDMapOwnPointer> handles_; 204 IDMap<ServiceWorkerHandle, IDMapOwnPointer> handles_;
190 IDMap<ServiceWorkerRegistrationHandle, IDMapOwnPointer> registration_handles_; 205 IDMap<ServiceWorkerRegistrationHandle, IDMapOwnPointer> registration_handles_;
191 206
192 bool channel_ready_; // True after BrowserMessageFilter::sender_ != NULL. 207 bool channel_ready_; // True after BrowserMessageFilter::sender_ != NULL.
193 ScopedVector<IPC::Message> pending_messages_; 208 ScopedVector<IPC::Message> pending_messages_;
194 209
195 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerDispatcherHost); 210 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerDispatcherHost);
196 }; 211 };
197 212
198 } // namespace content 213 } // namespace content
199 214
200 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_DISPATCHER_HOST_H_ 215 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_DISPATCHER_HOST_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698