OLD | NEW |
---|---|
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 #include "content/worker/websharedworkerclient_proxy.h" | 5 #include "content/worker/websharedworkerclient_proxy.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
9 #include "base/message_loop/message_loop.h" | 9 #include "base/message_loop/message_loop.h" |
10 #include "content/child/shared_worker_devtools_agent.h" | 10 #include "content/child/shared_worker_devtools_agent.h" |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
75 void WebSharedWorkerClientProxy::selectAppCacheID(long long app_cache_id) { | 75 void WebSharedWorkerClientProxy::selectAppCacheID(long long app_cache_id) { |
76 if (app_cache_host_) { | 76 if (app_cache_host_) { |
77 // app_cache_host_ could become stale as it's owned by blink's | 77 // app_cache_host_ could become stale as it's owned by blink's |
78 // DocumentLoader. This method is assumed to be called while it's valid. | 78 // DocumentLoader. This method is assumed to be called while it's valid. |
79 app_cache_host_->backend()->SelectCacheForSharedWorker( | 79 app_cache_host_->backend()->SelectCacheForSharedWorker( |
80 app_cache_host_->host_id(), | 80 app_cache_host_->host_id(), |
81 app_cache_id); | 81 app_cache_id); |
82 } | 82 } |
83 } | 83 } |
84 | 84 |
85 bool WebSharedWorkerClientProxy::enableMemoryInfo() { | |
86 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kEnableMemoryInfo)) | |
87 return true; | |
88 | |
89 return false; | |
90 } | |
kinuko
2014/02/28 05:26:12
As I commented on the other thread, can we avoid a
| |
91 | |
85 blink::WebNotificationPresenter* | 92 blink::WebNotificationPresenter* |
86 WebSharedWorkerClientProxy::notificationPresenter() { | 93 WebSharedWorkerClientProxy::notificationPresenter() { |
87 // TODO(johnnyg): Notifications are not yet hooked up to workers. | 94 // TODO(johnnyg): Notifications are not yet hooked up to workers. |
88 // Coming soon. | 95 // Coming soon. |
89 NOTREACHED(); | 96 NOTREACHED(); |
90 return NULL; | 97 return NULL; |
91 } | 98 } |
92 | 99 |
93 WebApplicationCacheHost* WebSharedWorkerClientProxy::createApplicationCacheHost( | 100 WebApplicationCacheHost* WebSharedWorkerClientProxy::createApplicationCacheHost( |
94 blink::WebApplicationCacheHostClient* client) { | 101 blink::WebApplicationCacheHostClient* client) { |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
130 // page. It's ok to post several of theese, because the first executed task | 137 // page. It's ok to post several of theese, because the first executed task |
131 // will exit the message loop and subsequent ones won't be executed. | 138 // will exit the message loop and subsequent ones won't be executed. |
132 base::MessageLoop::current()->PostDelayedTask( | 139 base::MessageLoop::current()->PostDelayedTask( |
133 FROM_HERE, | 140 FROM_HERE, |
134 base::Bind(&WebSharedWorkerClientProxy::workerContextDestroyed, | 141 base::Bind(&WebSharedWorkerClientProxy::workerContextDestroyed, |
135 weak_factory_.GetWeakPtr()), | 142 weak_factory_.GetWeakPtr()), |
136 base::TimeDelta::FromSeconds(kMaxTimeForRunawayWorkerSeconds)); | 143 base::TimeDelta::FromSeconds(kMaxTimeForRunawayWorkerSeconds)); |
137 } | 144 } |
138 | 145 |
139 } // namespace content | 146 } // namespace content |
OLD | NEW |