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

Side by Side Diff: content/child/service_worker/service_worker_dispatcher.h

Issue 2658603003: ServiceWorker: Enable UseCounter for ServiceWorkerGlobalScope (Closed)
Patch Set: int32_t -> uint32_t Created 3 years, 10 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_CHILD_SERVICE_WORKER_SERVICE_WORKER_DISPATCHER_H_ 5 #ifndef CONTENT_CHILD_SERVICE_WORKER_SERVICE_WORKER_DISPATCHER_H_
6 #define CONTENT_CHILD_SERVICE_WORKER_SERVICE_WORKER_DISPATCHER_H_ 6 #define CONTENT_CHILD_SERVICE_WORKER_SERVICE_WORKER_DISPATCHER_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <map> 10 #include <map>
11 #include <memory> 11 #include <memory>
12 #include <set>
12 #include <vector> 13 #include <vector>
13 14
14 #include "base/id_map.h" 15 #include "base/id_map.h"
15 #include "base/macros.h" 16 #include "base/macros.h"
16 #include "base/memory/ref_counted.h" 17 #include "base/memory/ref_counted.h"
17 #include "base/strings/string16.h" 18 #include "base/strings/string16.h"
18 #include "content/common/service_worker/service_worker_types.h" 19 #include "content/common/service_worker/service_worker_types.h"
19 #include "content/public/child/worker_thread.h" 20 #include "content/public/child/worker_thread.h"
20 #include "third_party/WebKit/public/platform/modules/serviceworker/WebServiceWor kerError.h" 21 #include "third_party/WebKit/public/platform/modules/serviceworker/WebServiceWor kerError.h"
21 #include "third_party/WebKit/public/platform/modules/serviceworker/WebServiceWor kerProvider.h" 22 #include "third_party/WebKit/public/platform/modules/serviceworker/WebServiceWor kerProvider.h"
(...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after
284 blink::WebServiceWorkerState state); 285 blink::WebServiceWorkerState state);
285 void OnSetVersionAttributes(int thread_id, 286 void OnSetVersionAttributes(int thread_id,
286 int registration_handle_id, 287 int registration_handle_id,
287 int changed_mask, 288 int changed_mask,
288 const ServiceWorkerVersionAttributes& attributes); 289 const ServiceWorkerVersionAttributes& attributes);
289 void OnUpdateFound(int thread_id, 290 void OnUpdateFound(int thread_id,
290 int registration_handle_id); 291 int registration_handle_id);
291 void OnSetControllerServiceWorker(int thread_id, 292 void OnSetControllerServiceWorker(int thread_id,
292 int provider_id, 293 int provider_id,
293 const ServiceWorkerObjectInfo& info, 294 const ServiceWorkerObjectInfo& info,
294 bool should_notify_controllerchange); 295 bool should_notify_controllerchange,
296 const std::set<uint32_t>& used_features);
295 void OnPostMessage(const ServiceWorkerMsg_MessageToDocument_Params& params); 297 void OnPostMessage(const ServiceWorkerMsg_MessageToDocument_Params& params);
298 void OnCountFeature(int thread_id, int provider_id, uint32_t feature);
296 299
297 // Keeps map from handle_id to ServiceWorker object. 300 // Keeps map from handle_id to ServiceWorker object.
298 void AddServiceWorker(int handle_id, WebServiceWorkerImpl* worker); 301 void AddServiceWorker(int handle_id, WebServiceWorkerImpl* worker);
299 void RemoveServiceWorker(int handle_id); 302 void RemoveServiceWorker(int handle_id);
300 303
301 // Keeps map from registration_handle_id to ServiceWorkerRegistration object. 304 // Keeps map from registration_handle_id to ServiceWorkerRegistration object.
302 void AddServiceWorkerRegistration( 305 void AddServiceWorkerRegistration(
303 int registration_handle_id, 306 int registration_handle_id,
304 WebServiceWorkerRegistrationImpl* registration); 307 WebServiceWorkerRegistrationImpl* registration);
305 void RemoveServiceWorkerRegistration( 308 void RemoveServiceWorkerRegistration(
(...skipping 25 matching lines...) Expand all
331 334
332 scoped_refptr<ThreadSafeSender> thread_safe_sender_; 335 scoped_refptr<ThreadSafeSender> thread_safe_sender_;
333 scoped_refptr<base::SingleThreadTaskRunner> main_thread_task_runner_; 336 scoped_refptr<base::SingleThreadTaskRunner> main_thread_task_runner_;
334 337
335 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerDispatcher); 338 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerDispatcher);
336 }; 339 };
337 340
338 } // namespace content 341 } // namespace content
339 342
340 #endif // CONTENT_CHILD_SERVICE_WORKER_SERVICE_WORKER_DISPATCHER_H_ 343 #endif // CONTENT_CHILD_SERVICE_WORKER_SERVICE_WORKER_DISPATCHER_H_
OLDNEW
« no previous file with comments | « content/browser/service_worker/service_worker_version.cc ('k') | content/child/service_worker/service_worker_dispatcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698