Chromium Code Reviews| Index: content/worker/websharedworkerclient_proxy.cc |
| diff --git a/content/worker/websharedworkerclient_proxy.cc b/content/worker/websharedworkerclient_proxy.cc |
| index 1e8c92fad295338d9a6826416a0abfe1e9e124b9..799d5e9896e165af2c074ad4a83df48c98278c66 100644 |
| --- a/content/worker/websharedworkerclient_proxy.cc |
| +++ b/content/worker/websharedworkerclient_proxy.cc |
| @@ -42,7 +42,8 @@ WebSharedWorkerClientProxy::WebSharedWorkerClientProxy( |
| appcache_host_id_(0), |
| stub_(stub), |
| weak_factory_(this), |
| - devtools_agent_(NULL) { |
| + devtools_agent_(NULL), |
| + app_cache_host_(NULL) { |
| } |
| WebSharedWorkerClientProxy::~WebSharedWorkerClientProxy() { |
| @@ -59,6 +60,24 @@ void WebSharedWorkerClientProxy::workerContextDestroyed() { |
| stub_->Shutdown(); |
| } |
| +void WebSharedWorkerClientProxy::workerScriptLoaded() { |
| + if (stub_) |
| + stub_->workerScriptLoaded(); |
| +} |
| + |
| +void WebSharedWorkerClientProxy::workerScriptLoadFailed() { |
| + if (stub_) |
| + stub_->workerScriptLoadFailed(); |
| +} |
| + |
| +void WebSharedWorkerClientProxy::selectAppChacheID(long long app_cache_id) { |
| + if (app_cache_host_) { |
|
kinuko
2013/12/20 05:29:39
app_cache_host_ could become stale as it's owned b
horo
2013/12/20 07:31:42
Done.
|
| + app_cache_host_->backend()->SelectCacheForSharedWorker( |
| + app_cache_host_->host_id(), |
| + app_cache_id); |
| + } |
| +} |
| + |
| blink::WebNotificationPresenter* |
| WebSharedWorkerClientProxy::notificationPresenter() { |
| // TODO(johnnyg): Notifications are not yet hooked up to workers. |
| @@ -69,13 +88,13 @@ WebSharedWorkerClientProxy::notificationPresenter() { |
| WebApplicationCacheHost* WebSharedWorkerClientProxy::createApplicationCacheHost( |
| blink::WebApplicationCacheHostClient* client) { |
|
kinuko
2013/12/20 05:29:39
DCHECK(!app_cache_host_) ?
horo
2013/12/20 07:31:42
Done.
|
| - WorkerWebApplicationCacheHostImpl* host = |
| + app_cache_host_ = |
| new WorkerWebApplicationCacheHostImpl(stub_->appcache_init_info(), |
| client); |
| // Remember the id of the instance we create so we have access to that |
| // value when creating nested dedicated workers in createWorker. |
| - appcache_host_id_ = host->host_id(); |
| - return host; |
| + appcache_host_id_ = app_cache_host_->host_id(); |
| + return app_cache_host_; |
| } |
| blink::WebWorkerPermissionClientProxy* |