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

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

Issue 1701843002: ServiceWorker: Implement 'source' and 'origin' attributes of ExtendableMessageEvent (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@move_focus_into_utils
Patch Set: clean up tests Created 4 years, 9 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
« no previous file with comments | « no previous file | content/browser/service_worker/service_worker_dispatcher_host.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 <vector> 10 #include <vector>
11 11
12 #include "base/id_map.h" 12 #include "base/id_map.h"
13 #include "base/macros.h" 13 #include "base/macros.h"
14 #include "base/memory/scoped_ptr.h" 14 #include "base/memory/scoped_ptr.h"
15 #include "base/memory/weak_ptr.h" 15 #include "base/memory/weak_ptr.h"
16 #include "base/strings/string16.h" 16 #include "base/strings/string16.h"
17 #include "content/browser/service_worker/service_worker_registration_status.h" 17 #include "content/browser/service_worker/service_worker_registration_status.h"
18 #include "content/common/service_worker/service_worker_types.h" 18 #include "content/common/service_worker/service_worker_types.h"
19 #include "content/public/browser/browser_message_filter.h" 19 #include "content/public/browser/browser_message_filter.h"
20 20
21 class GURL; 21 class GURL;
22 struct EmbeddedWorkerHostMsg_ReportConsoleMessage_Params; 22 struct EmbeddedWorkerHostMsg_ReportConsoleMessage_Params;
23 23
24 namespace url {
25 class Origin;
26 }
27
24 namespace content { 28 namespace content {
25 29
26 class MessagePortMessageFilter; 30 class MessagePortMessageFilter;
27 class ResourceContext; 31 class ResourceContext;
28 class ServiceWorkerContextCore; 32 class ServiceWorkerContextCore;
29 class ServiceWorkerContextWrapper; 33 class ServiceWorkerContextWrapper;
30 class ServiceWorkerHandle; 34 class ServiceWorkerHandle;
31 class ServiceWorkerProviderHost; 35 class ServiceWorkerProviderHost;
32 class ServiceWorkerRegistration; 36 class ServiceWorkerRegistration;
33 class ServiceWorkerRegistrationHandle; 37 class ServiceWorkerRegistrationHandle;
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
129 const GURL& source_url); 133 const GURL& source_url);
130 void OnReportConsoleMessage( 134 void OnReportConsoleMessage(
131 int embedded_worker_id, 135 int embedded_worker_id,
132 const EmbeddedWorkerHostMsg_ReportConsoleMessage_Params& params); 136 const EmbeddedWorkerHostMsg_ReportConsoleMessage_Params& params);
133 void OnIncrementServiceWorkerRefCount(int handle_id); 137 void OnIncrementServiceWorkerRefCount(int handle_id);
134 void OnDecrementServiceWorkerRefCount(int handle_id); 138 void OnDecrementServiceWorkerRefCount(int handle_id);
135 void OnIncrementRegistrationRefCount(int registration_handle_id); 139 void OnIncrementRegistrationRefCount(int registration_handle_id);
136 void OnDecrementRegistrationRefCount(int registration_handle_id); 140 void OnDecrementRegistrationRefCount(int registration_handle_id);
137 void OnPostMessageToWorker( 141 void OnPostMessageToWorker(
138 int handle_id, 142 int handle_id,
143 int provider_id,
139 const base::string16& message, 144 const base::string16& message,
145 const url::Origin& source_origin,
140 const std::vector<TransferredMessagePort>& sent_message_ports); 146 const std::vector<TransferredMessagePort>& sent_message_ports);
141 147
142 // TODO(nhiroki): Remove this after ExtendableMessageEvent is enabled by 148 // TODO(nhiroki): Remove this after ExtendableMessageEvent is enabled by
143 // default (crbug.com/543198). 149 // default (crbug.com/543198).
144 void OnDeprecatedPostMessageToWorker( 150 void OnDeprecatedPostMessageToWorker(
145 int handle_id, 151 int handle_id,
146 const base::string16& message, 152 const base::string16& message,
147 const std::vector<TransferredMessagePort>& sent_message_ports); 153 const std::vector<TransferredMessagePort>& sent_message_ports);
148 154
149 void OnTerminateWorker(int handle_id); 155 void OnTerminateWorker(int handle_id);
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
235 241
236 bool channel_ready_; // True after BrowserMessageFilter::sender_ != NULL. 242 bool channel_ready_; // True after BrowserMessageFilter::sender_ != NULL.
237 std::vector<scoped_ptr<IPC::Message>> pending_messages_; 243 std::vector<scoped_ptr<IPC::Message>> pending_messages_;
238 244
239 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerDispatcherHost); 245 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerDispatcherHost);
240 }; 246 };
241 247
242 } // namespace content 248 } // namespace content
243 249
244 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_DISPATCHER_HOST_H_ 250 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_DISPATCHER_HOST_H_
OLDNEW
« no previous file with comments | « no previous file | content/browser/service_worker/service_worker_dispatcher_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698