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