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_CHILD_SERVICE_WORKER_EMBEDDED_WORKER_CLIENT_H_ |
6 #define CONTENT_CHILD_SERVICE_WORKER_EMBEDDED_WORKER_CLIENT_H_ | 6 #define CONTENT_CHILD_SERVICE_WORKER_EMBEDDED_WORKER_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" |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
49 | 49 |
50 bool OnMessageReceived(const IPC::Message& msg); | 50 bool OnMessageReceived(const IPC::Message& msg); |
51 | 51 |
52 void SendMessageToBrowser(int request_id, const IPC::Message& message); | 52 void SendMessageToBrowser(int request_id, const IPC::Message& message); |
53 | 53 |
54 // WebServiceWorkerContextClient overrides, some of them are just dispatched | 54 // WebServiceWorkerContextClient overrides, some of them are just dispatched |
55 // on to script_context_. | 55 // on to script_context_. |
56 virtual void workerContextFailedToStart(); | 56 virtual void workerContextFailedToStart(); |
57 virtual void workerContextStarted(blink::WebServiceWorkerContextProxy* proxy); | 57 virtual void workerContextStarted(blink::WebServiceWorkerContextProxy* proxy); |
58 virtual void workerContextDestroyed(); | 58 virtual void workerContextDestroyed(); |
| 59 virtual void didHandleActivateEvent(int request_id, |
| 60 blink::WebServiceWorkerEventResult); |
59 virtual void didHandleInstallEvent(int request_id, | 61 virtual void didHandleInstallEvent(int request_id, |
60 blink::WebServiceWorkerEventResult result); | 62 blink::WebServiceWorkerEventResult result); |
61 virtual void didHandleFetchEvent(int request_id); | 63 virtual void didHandleFetchEvent(int request_id); |
62 virtual void didHandleFetchEvent( | 64 virtual void didHandleFetchEvent( |
63 int request_id, | 65 int request_id, |
64 const blink::WebServiceWorkerResponse& response); | 66 const blink::WebServiceWorkerResponse& response); |
65 | 67 |
66 // TODO: Implement DevTools related method overrides. | 68 // TODO: Implement DevTools related method overrides. |
67 | 69 |
68 int embedded_worker_id() const { return embedded_worker_id_; } | 70 int embedded_worker_id() const { return embedded_worker_id_; } |
(...skipping 18 matching lines...) Expand all Loading... |
87 scoped_ptr<ServiceWorkerScriptContext> script_context_; | 89 scoped_ptr<ServiceWorkerScriptContext> script_context_; |
88 | 90 |
89 base::WeakPtrFactory<EmbeddedWorkerContextClient> weak_factory_; | 91 base::WeakPtrFactory<EmbeddedWorkerContextClient> weak_factory_; |
90 | 92 |
91 DISALLOW_COPY_AND_ASSIGN(EmbeddedWorkerContextClient); | 93 DISALLOW_COPY_AND_ASSIGN(EmbeddedWorkerContextClient); |
92 }; | 94 }; |
93 | 95 |
94 } // namespace content | 96 } // namespace content |
95 | 97 |
96 #endif // CONTENT_CHILD_SERVICE_WORKER_EMBEDDED_WORKER_CLIENT_H_ | 98 #endif // CONTENT_CHILD_SERVICE_WORKER_EMBEDDED_WORKER_CLIENT_H_ |
OLD | NEW |