| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 CHROME_WORKER_WEBWORKERCLIENT_PROXY_H_ | 5 #ifndef CHROME_WORKER_WEBWORKERCLIENT_PROXY_H_ |
| 6 #define CHROME_WORKER_WEBWORKERCLIENT_PROXY_H_ | 6 #define CHROME_WORKER_WEBWORKERCLIENT_PROXY_H_ |
| 7 | 7 |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| 11 #include "base/task.h" | 11 #include "base/task.h" |
| 12 #include "ipc/ipc_channel.h" | 12 #include "ipc/ipc_channel.h" |
| 13 #include "third_party/WebKit/WebKit/chromium/public/WebWorkerClient.h" | 13 #include "third_party/WebKit/WebKit/chromium/public/WebWorkerClient.h" |
| 14 | 14 |
| 15 namespace WebKit { | 15 namespace WebKit { |
| 16 class WebApplicationCacheHost; |
| 17 class WebApplicationCacheHostClient; |
| 16 class WebWorker; | 18 class WebWorker; |
| 17 } | 19 } |
| 18 | 20 |
| 19 class WebWorkerStubBase; | 21 class WebWorkerStubBase; |
| 20 | 22 |
| 21 // This class receives IPCs from the renderer and calls the WebCore::Worker | 23 // This class receives IPCs from the renderer and calls the WebCore::Worker |
| 22 // implementation (after the data types have been converted by glue code). It | 24 // implementation (after the data types have been converted by glue code). It |
| 23 // is also called by the worker code and converts these function calls into | 25 // is also called by the worker code and converts these function calls into |
| 24 // IPCs that are sent to the renderer, where they're converted back to function | 26 // IPCs that are sent to the renderer, where they're converted back to function |
| 25 // calls by WebWorkerProxy. | 27 // calls by WebWorkerProxy. |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 61 virtual void workerContextDestroyed(); | 63 virtual void workerContextDestroyed(); |
| 62 virtual WebKit::WebWorker* createWorker(WebKit::WebWorkerClient* client); | 64 virtual WebKit::WebWorker* createWorker(WebKit::WebWorkerClient* client); |
| 63 | 65 |
| 64 virtual WebKit::WebNotificationPresenter* notificationPresenter() { | 66 virtual WebKit::WebNotificationPresenter* notificationPresenter() { |
| 65 // TODO(johnnyg): Notifications are not yet hooked up to workers. | 67 // TODO(johnnyg): Notifications are not yet hooked up to workers. |
| 66 // Coming soon. | 68 // Coming soon. |
| 67 NOTREACHED(); | 69 NOTREACHED(); |
| 68 return NULL; | 70 return NULL; |
| 69 } | 71 } |
| 70 | 72 |
| 73 virtual WebKit::WebApplicationCacheHost* createApplicationCacheHost( |
| 74 WebKit::WebApplicationCacheHostClient*) { |
| 75 // TODO(michaeln): Create and initialize an appcache host for our worker. |
| 76 return NULL; |
| 77 } |
| 78 |
| 71 void EnsureWorkerContextTerminates(); | 79 void EnsureWorkerContextTerminates(); |
| 72 | 80 |
| 73 private: | 81 private: |
| 74 bool Send(IPC::Message* message); | 82 bool Send(IPC::Message* message); |
| 75 | 83 |
| 76 int route_id_; | 84 int route_id_; |
| 77 WebWorkerStubBase* stub_; | 85 WebWorkerStubBase* stub_; |
| 78 ScopedRunnableMethodFactory<WebWorkerClientProxy> kill_process_factory_; | 86 ScopedRunnableMethodFactory<WebWorkerClientProxy> kill_process_factory_; |
| 79 | 87 |
| 80 DISALLOW_COPY_AND_ASSIGN(WebWorkerClientProxy); | 88 DISALLOW_COPY_AND_ASSIGN(WebWorkerClientProxy); |
| 81 }; | 89 }; |
| 82 | 90 |
| 83 #endif // CHROME_WORKER_WEBWORKERCLIENT_PROXY_H_ | 91 #endif // CHROME_WORKER_WEBWORKERCLIENT_PROXY_H_ |
| OLD | NEW |