| 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 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 65 blink::WebServiceWorkerEventResult); | 65 blink::WebServiceWorkerEventResult); |
| 66 virtual void didHandleInstallEvent(int request_id, | 66 virtual void didHandleInstallEvent(int request_id, |
| 67 blink::WebServiceWorkerEventResult result); | 67 blink::WebServiceWorkerEventResult result); |
| 68 virtual void didHandleFetchEvent(int request_id); | 68 virtual void didHandleFetchEvent(int request_id); |
| 69 virtual void didHandleFetchEvent( | 69 virtual void didHandleFetchEvent( |
| 70 int request_id, | 70 int request_id, |
| 71 const blink::WebServiceWorkerResponse& response); | 71 const blink::WebServiceWorkerResponse& response); |
| 72 virtual blink::WebServiceWorkerNetworkProvider* | 72 virtual blink::WebServiceWorkerNetworkProvider* |
| 73 createServiceWorkerNetworkProvider(blink::WebDataSource* data_source); | 73 createServiceWorkerNetworkProvider(blink::WebDataSource* data_source); |
| 74 virtual void didHandleSyncEvent(int request_id); | 74 virtual void didHandleSyncEvent(int request_id); |
| 75 virtual void requestSyncEvents(int request_id, bool requested); |
| 75 | 76 |
| 76 // TODO: Implement DevTools related method overrides. | 77 // TODO: Implement DevTools related method overrides. |
| 77 | 78 |
| 78 int embedded_worker_id() const { return embedded_worker_id_; } | 79 int embedded_worker_id() const { return embedded_worker_id_; } |
| 79 base::MessageLoopProxy* main_thread_proxy() const { | 80 base::MessageLoopProxy* main_thread_proxy() const { |
| 80 return main_thread_proxy_; | 81 return main_thread_proxy_; |
| 81 } | 82 } |
| 82 | 83 |
| 83 private: | 84 private: |
| 84 void OnSendMessageToWorker(int thread_id, | 85 void OnSendMessageToWorker(int thread_id, |
| (...skipping 12 matching lines...) Expand all Loading... |
| 97 scoped_ptr<ServiceWorkerScriptContext> script_context_; | 98 scoped_ptr<ServiceWorkerScriptContext> script_context_; |
| 98 | 99 |
| 99 base::WeakPtrFactory<EmbeddedWorkerContextClient> weak_factory_; | 100 base::WeakPtrFactory<EmbeddedWorkerContextClient> weak_factory_; |
| 100 | 101 |
| 101 DISALLOW_COPY_AND_ASSIGN(EmbeddedWorkerContextClient); | 102 DISALLOW_COPY_AND_ASSIGN(EmbeddedWorkerContextClient); |
| 102 }; | 103 }; |
| 103 | 104 |
| 104 } // namespace content | 105 } // namespace content |
| 105 | 106 |
| 106 #endif // CONTENT_CHILD_SERVICE_WORKER_EMBEDDED_WORKER_CLIENT_H_ | 107 #endif // CONTENT_CHILD_SERVICE_WORKER_EMBEDDED_WORKER_CLIENT_H_ |
| OLD | NEW |