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

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

Issue 2787883003: [ServiceWorker] Add EmbeddedWorkerInstanceHost Interface. (Closed)
Patch Set: Refine code comments Created 3 years, 8 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 <stdint.h> 8 #include <stdint.h>
9 9
10 #include <memory> 10 #include <memory>
11 #include <vector> 11 #include <vector>
12 12
13 #include "base/id_map.h" 13 #include "base/id_map.h"
14 #include "base/macros.h" 14 #include "base/macros.h"
15 #include "base/memory/weak_ptr.h" 15 #include "base/memory/weak_ptr.h"
16 #include "base/optional.h" 16 #include "base/optional.h"
17 #include "base/strings/string16.h" 17 #include "base/strings/string16.h"
18 #include "content/browser/service_worker/service_worker_registration_status.h" 18 #include "content/browser/service_worker/service_worker_registration_status.h"
19 #include "content/common/service_worker/service_worker.mojom.h" 19 #include "content/common/service_worker/service_worker.mojom.h"
20 #include "content/common/service_worker/service_worker_types.h" 20 #include "content/common/service_worker/service_worker_types.h"
21 #include "content/public/browser/browser_message_filter.h" 21 #include "content/public/browser/browser_message_filter.h"
22 #include "mojo/public/cpp/bindings/associated_binding_set.h" 22 #include "mojo/public/cpp/bindings/associated_binding_set.h"
23 23
24 class GURL; 24 class GURL;
25 struct EmbeddedWorkerHostMsg_ReportConsoleMessage_Params;
26 25
27 namespace url { 26 namespace url {
28 class Origin; 27 class Origin;
29 } // namespace url 28 } // namespace url
30 29
31 namespace content { 30 namespace content {
32 31
33 class MessagePort; 32 class MessagePort;
34 class ResourceContext; 33 class ResourceContext;
35 class ServiceWorkerContextCore; 34 class ServiceWorkerContextCore;
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
136 bool enable); 135 bool enable);
137 void OnGetNavigationPreloadState(int thread_id, 136 void OnGetNavigationPreloadState(int thread_id,
138 int request_id, 137 int request_id,
139 int provider_id, 138 int provider_id,
140 int64_t registration_id); 139 int64_t registration_id);
141 void OnSetNavigationPreloadHeader(int thread_id, 140 void OnSetNavigationPreloadHeader(int thread_id,
142 int request_id, 141 int request_id,
143 int provider_id, 142 int provider_id,
144 int64_t registration_id, 143 int64_t registration_id,
145 const std::string& value); 144 const std::string& value);
146 void OnWorkerReadyForInspection(int embedded_worker_id);
147 void OnWorkerScriptLoaded(int embedded_worker_id);
148 void OnWorkerThreadStarted(int embedded_worker_id,
149 int thread_id,
150 int provider_id);
151 void OnWorkerScriptLoadFailed(int embedded_worker_id);
152 void OnWorkerScriptEvaluated(int embedded_worker_id, bool success);
153 void OnWorkerStarted(int embedded_worker_id);
154 void OnWorkerStopped(int embedded_worker_id);
155 void OnCountFeature(int64_t version_id, uint32_t feature); 145 void OnCountFeature(int64_t version_id, uint32_t feature);
156 void OnReportException(int embedded_worker_id,
157 const base::string16& error_message,
158 int line_number,
159 int column_number,
160 const GURL& source_url);
161 void OnReportConsoleMessage(
162 int embedded_worker_id,
163 const EmbeddedWorkerHostMsg_ReportConsoleMessage_Params& params);
164 void OnIncrementServiceWorkerRefCount(int handle_id); 146 void OnIncrementServiceWorkerRefCount(int handle_id);
165 void OnDecrementServiceWorkerRefCount(int handle_id); 147 void OnDecrementServiceWorkerRefCount(int handle_id);
166 void OnIncrementRegistrationRefCount(int registration_handle_id); 148 void OnIncrementRegistrationRefCount(int registration_handle_id);
167 void OnDecrementRegistrationRefCount(int registration_handle_id); 149 void OnDecrementRegistrationRefCount(int registration_handle_id);
168 void OnPostMessageToWorker( 150 void OnPostMessageToWorker(
169 int handle_id, 151 int handle_id,
170 int provider_id, 152 int provider_id,
171 const base::string16& message, 153 const base::string16& message,
172 const url::Origin& source_origin, 154 const url::Origin& source_origin,
173 const std::vector<MessagePort>& sent_message_ports); 155 const std::vector<MessagePort>& sent_message_ports);
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
287 mojo::AssociatedBindingSet<mojom::ServiceWorkerDispatcherHost> bindings_; 269 mojo::AssociatedBindingSet<mojom::ServiceWorkerDispatcherHost> bindings_;
288 270
289 base::WeakPtrFactory<ServiceWorkerDispatcherHost> weak_factory_; 271 base::WeakPtrFactory<ServiceWorkerDispatcherHost> weak_factory_;
290 272
291 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerDispatcherHost); 273 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerDispatcherHost);
292 }; 274 };
293 275
294 } // namespace content 276 } // namespace content
295 277
296 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_DISPATCHER_HOST_H_ 278 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_DISPATCHER_HOST_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698