OLD | NEW |
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_EMBEDDED_WORKER_CLIENT_H_ | 5 #ifndef CONTENT_RENDERER_SERVICE_WORKER_EMBEDDED_WORKER_CONTEXT_CLIENT_H_ |
6 #define CONTENT_CHILD_SERVICE_WORKER_EMBEDDED_WORKER_CLIENT_H_ | 6 #define CONTENT_RENDERER_SERVICE_WORKER_EMBEDDED_WORKER_CONTEXT_CLIENT_H_ |
7 | 7 |
8 #include "base/memory/ref_counted.h" | 8 #include "base/memory/ref_counted.h" |
9 #include "base/memory/weak_ptr.h" | 9 #include "base/memory/weak_ptr.h" |
10 #include "base/strings/string16.h" | 10 #include "base/strings/string16.h" |
11 #include "content/common/service_worker/service_worker_types.h" | 11 #include "content/common/service_worker/service_worker_types.h" |
12 #include "ipc/ipc_listener.h" | 12 #include "ipc/ipc_listener.h" |
13 #include "third_party/WebKit/public/platform/WebServiceWorkerClientsInfo.h" | 13 #include "third_party/WebKit/public/platform/WebServiceWorkerClientsInfo.h" |
14 #include "third_party/WebKit/public/platform/WebServiceWorkerEventResult.h" | 14 #include "third_party/WebKit/public/platform/WebServiceWorkerEventResult.h" |
15 #include "third_party/WebKit/public/platform/WebURL.h" | 15 #include "third_party/WebKit/public/platform/WebURL.h" |
16 #include "third_party/WebKit/public/web/WebServiceWorkerContextClient.h" | 16 #include "third_party/WebKit/public/web/WebServiceWorkerContextClient.h" |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
53 const GURL& service_worker_scope, | 53 const GURL& service_worker_scope, |
54 const GURL& script_url, | 54 const GURL& script_url, |
55 int worker_devtools_agent_route_id); | 55 int worker_devtools_agent_route_id); |
56 | 56 |
57 virtual ~EmbeddedWorkerContextClient(); | 57 virtual ~EmbeddedWorkerContextClient(); |
58 | 58 |
59 bool OnMessageReceived(const IPC::Message& msg); | 59 bool OnMessageReceived(const IPC::Message& msg); |
60 | 60 |
61 void Send(IPC::Message* message); | 61 void Send(IPC::Message* message); |
62 | 62 |
63 // TODO(kinuko): Deprecate this. | |
64 void SendReplyToBrowser(int request_id, const IPC::Message& message); | |
65 | |
66 // WebServiceWorkerContextClient overrides, some of them are just dispatched | 63 // WebServiceWorkerContextClient overrides, some of them are just dispatched |
67 // on to script_context_. | 64 // on to script_context_. |
68 virtual blink::WebURL scope() const; | 65 virtual blink::WebURL scope() const; |
69 virtual void didPauseAfterDownload(); | 66 virtual void didPauseAfterDownload(); |
70 virtual void getClients(blink::WebServiceWorkerClientsCallbacks*); | 67 virtual void getClients(blink::WebServiceWorkerClientsCallbacks*); |
71 virtual void workerContextFailedToStart(); | 68 virtual void workerContextFailedToStart(); |
72 virtual void workerContextStarted(blink::WebServiceWorkerContextProxy* proxy); | 69 virtual void workerContextStarted(blink::WebServiceWorkerContextProxy* proxy); |
73 virtual void willDestroyWorkerContext(); | 70 virtual void willDestroyWorkerContext(); |
74 virtual void workerContextDestroyed(); | 71 virtual void workerContextDestroyed(); |
75 virtual void reportException(const blink::WebString& error_message, | 72 virtual void reportException(const blink::WebString& error_message, |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
124 | 121 |
125 scoped_ptr<ServiceWorkerScriptContext> script_context_; | 122 scoped_ptr<ServiceWorkerScriptContext> script_context_; |
126 | 123 |
127 base::WeakPtrFactory<EmbeddedWorkerContextClient> weak_factory_; | 124 base::WeakPtrFactory<EmbeddedWorkerContextClient> weak_factory_; |
128 | 125 |
129 DISALLOW_COPY_AND_ASSIGN(EmbeddedWorkerContextClient); | 126 DISALLOW_COPY_AND_ASSIGN(EmbeddedWorkerContextClient); |
130 }; | 127 }; |
131 | 128 |
132 } // namespace content | 129 } // namespace content |
133 | 130 |
134 #endif // CONTENT_CHILD_SERVICE_WORKER_EMBEDDED_WORKER_CLIENT_H_ | 131 #endif // CONTENT_RENDERER_SERVICE_WORKER_EMBEDDED_WORKER_CONTEXT_CLIENT_H_ |
OLD | NEW |