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

Side by Side Diff: content/renderer/service_worker/service_worker_context_client.h

Issue 1256323008: [Extension ServiceWorkers] Chrome: Passing v8::context to extensions dispatcher (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 4 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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_RENDERER_SERVICE_WORKER_SERVICE_WORKER_CONTEXT_CLIENT_H_ 5 #ifndef CONTENT_RENDERER_SERVICE_WORKER_SERVICE_WORKER_CONTEXT_CLIENT_H_
6 #define CONTENT_RENDERER_SERVICE_WORKER_SERVICE_WORKER_CONTEXT_CLIENT_H_ 6 #define CONTENT_RENDERER_SERVICE_WORKER_SERVICE_WORKER_CONTEXT_CLIENT_H_
7 7
8 #include <map> 8 #include <map>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
11 11
12 #include "base/id_map.h" 12 #include "base/id_map.h"
13 #include "base/memory/ref_counted.h" 13 #include "base/memory/ref_counted.h"
14 #include "base/memory/scoped_ptr.h" 14 #include "base/memory/scoped_ptr.h"
15 #include "base/strings/string16.h" 15 #include "base/strings/string16.h"
16 #include "base/time/time.h" 16 #include "base/time/time.h"
17 #include "content/child/webmessageportchannel_impl.h" 17 #include "content/child/webmessageportchannel_impl.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/common/service_worker_event_status.mojom.h" 19 #include "content/public/common/service_worker_event_status.mojom.h"
20 #include "ipc/ipc_listener.h" 20 #include "ipc/ipc_listener.h"
21 #include "mojo/application/public/interfaces/service_provider.mojom.h" 21 #include "mojo/application/public/interfaces/service_provider.mojom.h"
22 #include "third_party/WebKit/public/platform/WebGeofencingEventType.h" 22 #include "third_party/WebKit/public/platform/WebGeofencingEventType.h"
23 #include "third_party/WebKit/public/platform/WebMessagePortChannel.h" 23 #include "third_party/WebKit/public/platform/WebMessagePortChannel.h"
24 #include "third_party/WebKit/public/platform/WebServiceWorkerError.h" 24 #include "third_party/WebKit/public/platform/WebServiceWorkerError.h"
25 #include "third_party/WebKit/public/web/WebServiceWorkerContextClient.h" 25 #include "third_party/WebKit/public/web/WebServiceWorkerContextClient.h"
26 #include "v8/include/v8.h"
26 27
27 namespace base { 28 namespace base {
28 class SingleThreadTaskRunner; 29 class SingleThreadTaskRunner;
29 class TaskRunner; 30 class TaskRunner;
30 } 31 }
31 32
32 namespace blink { 33 namespace blink {
33 struct WebCircularGeofencingRegion; 34 struct WebCircularGeofencingRegion;
34 struct WebCrossOriginServiceWorkerClient; 35 struct WebCrossOriginServiceWorkerClient;
35 class WebDataSource; 36 class WebDataSource;
36 struct WebServiceWorkerClientQueryOptions; 37 struct WebServiceWorkerClientQueryOptions;
37 class WebServiceWorkerContextProxy; 38 class WebServiceWorkerContextProxy;
38 class WebServiceWorkerProvider; 39 class WebServiceWorkerProvider;
40
Devlin 2015/07/30 21:31:08 ?
39 struct WebSyncRegistration; 41 struct WebSyncRegistration;
40 } 42 }
41 43
42 namespace IPC { 44 namespace IPC {
43 class Message; 45 class Message;
44 } 46 }
45 47
46 namespace content { 48 namespace content {
47 49
48 struct NavigatorConnectClient; 50 struct NavigatorConnectClient;
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 const char* data, 95 const char* data,
94 size_t size); 96 size_t size);
95 virtual void clearCachedMetadata(const blink::WebURL&); 97 virtual void clearCachedMetadata(const blink::WebURL&);
96 virtual void workerReadyForInspection(); 98 virtual void workerReadyForInspection();
97 99
98 // Called on the main thread. 100 // Called on the main thread.
99 virtual void workerContextFailedToStart(); 101 virtual void workerContextFailedToStart();
100 102
101 virtual void workerContextStarted(blink::WebServiceWorkerContextProxy* proxy); 103 virtual void workerContextStarted(blink::WebServiceWorkerContextProxy* proxy);
102 virtual void didEvaluateWorkerScript(bool success); 104 virtual void didEvaluateWorkerScript(bool success);
105 virtual void didInitializeWorkerContext(v8::Local<v8::Context> context,
106 const blink::WebURL& url);
103 virtual void willDestroyWorkerContext(); 107 virtual void willDestroyWorkerContext();
104 virtual void workerContextDestroyed(); 108 virtual void workerContextDestroyed();
105 virtual void reportException(const blink::WebString& error_message, 109 virtual void reportException(const blink::WebString& error_message,
106 int line_number, 110 int line_number,
107 int column_number, 111 int column_number,
108 const blink::WebString& source_url); 112 const blink::WebString& source_url);
109 virtual void reportConsoleMessage(int source, 113 virtual void reportConsoleMessage(int source,
110 int level, 114 int level,
111 const blink::WebString& message, 115 const blink::WebString& message,
112 int line_number, 116 int line_number,
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
228 // Initialized on the worker thread in workerContextStarted and 232 // Initialized on the worker thread in workerContextStarted and
229 // destructed on the worker thread in willDestroyWorkerContext. 233 // destructed on the worker thread in willDestroyWorkerContext.
230 scoped_ptr<WorkerContextData> context_; 234 scoped_ptr<WorkerContextData> context_;
231 235
232 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerContextClient); 236 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerContextClient);
233 }; 237 };
234 238
235 } // namespace content 239 } // namespace content
236 240
237 #endif // CONTENT_RENDERER_SERVICE_WORKER_SERVICE_WORKER_CONTEXT_CLIENT_H_ 241 #endif // CONTENT_RENDERER_SERVICE_WORKER_SERVICE_WORKER_CONTEXT_CLIENT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698