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

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

Issue 2422793002: HTML MessagePort as mojo::MessagePipeHandle (Closed)
Patch Set: Add missing ScopedAsyncTaskScheduler instance for the new unit tests; required by a recent change 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_BROWSER_SERVICE_WORKER_SERVICE_WORKER_PROVIDER_HOST_H_ 5 #ifndef CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_PROVIDER_HOST_H_
6 #define CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_PROVIDER_HOST_H_ 6 #define CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_PROVIDER_HOST_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
(...skipping 13 matching lines...) Expand all
24 #include "content/public/common/request_context_frame_type.h" 24 #include "content/public/common/request_context_frame_type.h"
25 #include "content/public/common/request_context_type.h" 25 #include "content/public/common/request_context_type.h"
26 #include "content/public/common/resource_type.h" 26 #include "content/public/common/resource_type.h"
27 27
28 namespace storage { 28 namespace storage {
29 class BlobStorageContext; 29 class BlobStorageContext;
30 } 30 }
31 31
32 namespace content { 32 namespace content {
33 33
34 class MessagePort;
34 class ResourceRequestBodyImpl; 35 class ResourceRequestBodyImpl;
35 class ServiceWorkerContextCore; 36 class ServiceWorkerContextCore;
36 class ServiceWorkerDispatcherHost; 37 class ServiceWorkerDispatcherHost;
37 class ServiceWorkerRequestHandler; 38 class ServiceWorkerRequestHandler;
38 class ServiceWorkerVersion; 39 class ServiceWorkerVersion;
39 class WebContents; 40 class WebContents;
40 41
41 // This class is the browser-process representation of a service worker 42 // This class is the browser-process representation of a service worker
42 // provider. There are two general types of providers: 1) those for a client 43 // provider. There are two general types of providers: 1) those for a client
43 // (windows, dedicated workers, or shared workers), and 2) those for hosting a 44 // (windows, dedicated workers, or shared workers), and 2) those for hosting a
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after
225 // an existing registration is being looked for. 226 // an existing registration is being looked for.
226 void SetAllowAssociation(bool allow) { allow_association_ = allow; } 227 void SetAllowAssociation(bool allow) { allow_association_ = allow; }
227 228
228 // Returns true if the context referred to by this host (i.e. |context_|) is 229 // Returns true if the context referred to by this host (i.e. |context_|) is
229 // still alive. 230 // still alive.
230 bool IsContextAlive(); 231 bool IsContextAlive();
231 232
232 // Dispatches message event to the document. 233 // Dispatches message event to the document.
233 void PostMessageToClient(ServiceWorkerVersion* version, 234 void PostMessageToClient(ServiceWorkerVersion* version,
234 const base::string16& message, 235 const base::string16& message,
235 const std::vector<int>& sent_message_ports); 236 const std::vector<MessagePort>& sent_message_ports);
236 237
237 // Notifies the client that its controller used a feature, for UseCounter 238 // Notifies the client that its controller used a feature, for UseCounter
238 // purposes. This can only be called if IsProviderForClient() is true. 239 // purposes. This can only be called if IsProviderForClient() is true.
239 void CountFeature(uint32_t feature); 240 void CountFeature(uint32_t feature);
240 241
241 // Adds reference of this host's process to the |pattern|, the reference will 242 // Adds reference of this host's process to the |pattern|, the reference will
242 // be removed in destructor. 243 // be removed in destructor.
243 void AddScopedProcessReferenceToPattern(const GURL& pattern); 244 void AddScopedProcessReferenceToPattern(const GURL& pattern);
244 245
245 // |registration| claims the document to be controlled. 246 // |registration| claims the document to be controlled.
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after
410 bool allow_association_; 411 bool allow_association_;
411 412
412 std::vector<base::Closure> queued_events_; 413 std::vector<base::Closure> queued_events_;
413 414
414 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerProviderHost); 415 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerProviderHost);
415 }; 416 };
416 417
417 } // namespace content 418 } // namespace content
418 419
419 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_PROVIDER_HOST_H_ 420 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_PROVIDER_HOST_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698