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

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

Issue 2521793004: service worker: Persist NavigationPreloadState (Closed)
Patch Set: expect_ name Created 4 years 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 <stdint.h> 8 #include <stdint.h>
9 9
10 #include <memory> 10 #include <memory>
(...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after
252 ServiceWorkerRegistration* registration); 252 ServiceWorkerRegistration* registration);
253 253
254 ServiceWorkerContextCore* GetContext(); 254 ServiceWorkerContextCore* GetContext();
255 // Returns the provider host with id equal to |provider_id|, or nullptr 255 // Returns the provider host with id equal to |provider_id|, or nullptr
256 // if the provider host could not be found or is not appropriate for 256 // if the provider host could not be found or is not appropriate for
257 // initiating a request such as register/unregister/update. 257 // initiating a request such as register/unregister/update.
258 ServiceWorkerProviderHost* GetProviderHostForRequest( 258 ServiceWorkerProviderHost* GetProviderHostForRequest(
259 ProviderStatus* out_status, 259 ProviderStatus* out_status,
260 int provider_id); 260 int provider_id);
261 261
262 void DidUpdateNavigationPreloadEnabled(int thread_id,
263 int request_id,
264 int registration_id,
265 bool enable,
266 ServiceWorkerStatusCode status);
267 void DidUpdateNavigationPreloadHeader(int thread_id,
268 int request_id,
269 int registration_id,
270 const std::string& value,
271 ServiceWorkerStatusCode status);
272
262 const int render_process_id_; 273 const int render_process_id_;
263 MessagePortMessageFilter* const message_port_message_filter_; 274 MessagePortMessageFilter* const message_port_message_filter_;
264 ResourceContext* resource_context_; 275 ResourceContext* resource_context_;
265 scoped_refptr<ServiceWorkerContextWrapper> context_wrapper_; 276 scoped_refptr<ServiceWorkerContextWrapper> context_wrapper_;
266 277
267 IDMap<ServiceWorkerHandle, IDMapOwnPointer> handles_; 278 IDMap<ServiceWorkerHandle, IDMapOwnPointer> handles_;
268 279
269 using RegistrationHandleMap = 280 using RegistrationHandleMap =
270 IDMap<ServiceWorkerRegistrationHandle, IDMapOwnPointer>; 281 IDMap<ServiceWorkerRegistrationHandle, IDMapOwnPointer>;
271 RegistrationHandleMap registration_handles_; 282 RegistrationHandleMap registration_handles_;
272 283
273 bool channel_ready_; // True after BrowserMessageFilter::sender_ != NULL. 284 bool channel_ready_; // True after BrowserMessageFilter::sender_ != NULL.
274 std::vector<std::unique_ptr<IPC::Message>> pending_messages_; 285 std::vector<std::unique_ptr<IPC::Message>> pending_messages_;
275 286
276 mojo::AssociatedBindingSet<mojom::ServiceWorkerDispatcherHost> bindings_; 287 mojo::AssociatedBindingSet<mojom::ServiceWorkerDispatcherHost> bindings_;
277 288
278 base::WeakPtrFactory<ServiceWorkerDispatcherHost> weak_factory_; 289 base::WeakPtrFactory<ServiceWorkerDispatcherHost> weak_factory_;
279 290
280 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerDispatcherHost); 291 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerDispatcherHost);
281 }; 292 };
282 293
283 } // namespace content 294 } // namespace content
284 295
285 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_DISPATCHER_HOST_H_ 296 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_DISPATCHER_HOST_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698