Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(243)

Side by Side Diff: content/worker/websharedworkerclient_proxy.cc

Issue 14796018: Cleanup: Deprecate FileSystemCallbackDispatcher (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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.h" 9 #include "base/message_loop.h"
10 #include "content/common/fileapi/file_system_dispatcher.h" 10 #include "content/common/fileapi/file_system_dispatcher.h"
11 #include "content/common/fileapi/webfilesystem_callback_dispatcher.h" 11 #include "content/common/fileapi/webfilesystem_callback_adapters.h"
12 #include "content/common/quota_dispatcher.h" 12 #include "content/common/quota_dispatcher.h"
13 #include "content/common/webmessageportchannel_impl.h" 13 #include "content/common/webmessageportchannel_impl.h"
14 #include "content/common/worker_messages.h" 14 #include "content/common/worker_messages.h"
15 #include "content/public/common/content_switches.h" 15 #include "content/public/common/content_switches.h"
16 #include "content/worker/shared_worker_devtools_agent.h" 16 #include "content/worker/shared_worker_devtools_agent.h"
17 #include "content/worker/websharedworker_stub.h" 17 #include "content/worker/websharedworker_stub.h"
18 #include "content/worker/worker_thread.h" 18 #include "content/worker/worker_thread.h"
19 #include "content/worker/worker_webapplicationcachehost_impl.h" 19 #include "content/worker/worker_webapplicationcachehost_impl.h"
20 #include "ipc/ipc_logging.h" 20 #include "ipc/ipc_logging.h"
21 #include "third_party/WebKit/Source/Platform/chromium/public/WebString.h" 21 #include "third_party/WebKit/Source/Platform/chromium/public/WebString.h"
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after
161 return result; 161 return result;
162 } 162 }
163 163
164 void WebSharedWorkerClientProxy::openFileSystem( 164 void WebSharedWorkerClientProxy::openFileSystem(
165 WebKit::WebFileSystemType type, 165 WebKit::WebFileSystemType type,
166 long long size, 166 long long size,
167 bool create, 167 bool create,
168 WebKit::WebFileSystemCallbacks* callbacks) { 168 WebKit::WebFileSystemCallbacks* callbacks) {
169 ChildThread::current()->file_system_dispatcher()->OpenFileSystem( 169 ChildThread::current()->file_system_dispatcher()->OpenFileSystem(
170 stub_->url().GetOrigin(), static_cast<fileapi::FileSystemType>(type), 170 stub_->url().GetOrigin(), static_cast<fileapi::FileSystemType>(type),
171 size, create, new WebFileSystemCallbackDispatcher(callbacks)); 171 size, create,
172 base::Bind(&OpenFileSystemCallbackAdapter, callbacks),
173 base::Bind(&FileStatusCallbackAdapter, callbacks));
172 } 174 }
173 175
174 bool WebSharedWorkerClientProxy::allowIndexedDB(const WebKit::WebString& name) { 176 bool WebSharedWorkerClientProxy::allowIndexedDB(const WebKit::WebString& name) {
175 bool result = false; 177 bool result = false;
176 Send(new WorkerProcessHostMsg_AllowIndexedDB( 178 Send(new WorkerProcessHostMsg_AllowIndexedDB(
177 route_id_, stub_->url().GetOrigin(), name, &result)); 179 route_id_, stub_->url().GetOrigin(), name, &result));
178 return result; 180 return result;
179 } 181 }
180 182
181 void WebSharedWorkerClientProxy::queryUsageAndQuota( 183 void WebSharedWorkerClientProxy::queryUsageAndQuota(
(...skipping 26 matching lines...) Expand all
208 // page. It's ok to post several of theese, because the first executed task 210 // page. It's ok to post several of theese, because the first executed task
209 // will exit the message loop and subsequent ones won't be executed. 211 // will exit the message loop and subsequent ones won't be executed.
210 base::MessageLoop::current()->PostDelayedTask( 212 base::MessageLoop::current()->PostDelayedTask(
211 FROM_HERE, 213 FROM_HERE,
212 base::Bind(&WebSharedWorkerClientProxy::workerContextDestroyed, 214 base::Bind(&WebSharedWorkerClientProxy::workerContextDestroyed,
213 weak_factory_.GetWeakPtr()), 215 weak_factory_.GetWeakPtr()),
214 base::TimeDelta::FromSeconds(kMaxTimeForRunawayWorkerSeconds)); 216 base::TimeDelta::FromSeconds(kMaxTimeForRunawayWorkerSeconds));
215 } 217 }
216 218
217 } // namespace content 219 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/render_view_impl.cc ('k') | webkit/chromeos/fileapi/remote_file_system_operation.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698