| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 79 } | 79 } |
| 80 | 80 |
| 81 LocalFileSystem::~LocalFileSystem() | 81 LocalFileSystem::~LocalFileSystem() |
| 82 { | 82 { |
| 83 } | 83 } |
| 84 | 84 |
| 85 void LocalFileSystem::resolveURL(ExecutionContext* context, const KURL& fileSyst
emURL, std::unique_ptr<AsyncFileSystemCallbacks> callbacks) | 85 void LocalFileSystem::resolveURL(ExecutionContext* context, const KURL& fileSyst
emURL, std::unique_ptr<AsyncFileSystemCallbacks> callbacks) |
| 86 { | 86 { |
| 87 CallbackWrapper* wrapper = new CallbackWrapper(std::move(callbacks)); | 87 CallbackWrapper* wrapper = new CallbackWrapper(std::move(callbacks)); |
| 88 requestFileSystemAccessInternal(context, | 88 requestFileSystemAccessInternal(context, |
| 89 bind(&LocalFileSystem::resolveURLInternal, wrapPersistent(this), wrapPer
sistent(context), fileSystemURL, wrapPersistent(wrapper)), | 89 WTF::bind(&LocalFileSystem::resolveURLInternal, wrapPersistent(this), wr
apPersistent(context), fileSystemURL, wrapPersistent(wrapper)), |
| 90 bind(&LocalFileSystem::fileSystemNotAllowedInternal, wrapPersistent(this
), wrapPersistent(context), wrapPersistent(wrapper))); | 90 WTF::bind(&LocalFileSystem::fileSystemNotAllowedInternal, wrapPersistent
(this), wrapPersistent(context), wrapPersistent(wrapper))); |
| 91 } | 91 } |
| 92 | 92 |
| 93 void LocalFileSystem::requestFileSystem(ExecutionContext* context, FileSystemTyp
e type, long long size, std::unique_ptr<AsyncFileSystemCallbacks> callbacks) | 93 void LocalFileSystem::requestFileSystem(ExecutionContext* context, FileSystemTyp
e type, long long size, std::unique_ptr<AsyncFileSystemCallbacks> callbacks) |
| 94 { | 94 { |
| 95 CallbackWrapper* wrapper = new CallbackWrapper(std::move(callbacks)); | 95 CallbackWrapper* wrapper = new CallbackWrapper(std::move(callbacks)); |
| 96 requestFileSystemAccessInternal(context, | 96 requestFileSystemAccessInternal(context, |
| 97 bind(&LocalFileSystem::fileSystemAllowedInternal, wrapPersistent(this),
wrapPersistent(context), type, wrapPersistent(wrapper)), | 97 WTF::bind(&LocalFileSystem::fileSystemAllowedInternal, wrapPersistent(th
is), wrapPersistent(context), type, wrapPersistent(wrapper)), |
| 98 bind(&LocalFileSystem::fileSystemNotAllowedInternal, wrapPersistent(this
), wrapPersistent(context), wrapPersistent(wrapper))); | 98 WTF::bind(&LocalFileSystem::fileSystemNotAllowedInternal, wrapPersistent
(this), wrapPersistent(context), wrapPersistent(wrapper))); |
| 99 } | 99 } |
| 100 | 100 |
| 101 void LocalFileSystem::deleteFileSystem(ExecutionContext* context, FileSystemType
type, std::unique_ptr<AsyncFileSystemCallbacks> callbacks) | 101 void LocalFileSystem::deleteFileSystem(ExecutionContext* context, FileSystemType
type, std::unique_ptr<AsyncFileSystemCallbacks> callbacks) |
| 102 { | 102 { |
| 103 ASSERT(context); | 103 ASSERT(context); |
| 104 ASSERT_WITH_SECURITY_IMPLICATION(context->isDocument()); | 104 ASSERT_WITH_SECURITY_IMPLICATION(context->isDocument()); |
| 105 | 105 |
| 106 CallbackWrapper* wrapper = new CallbackWrapper(std::move(callbacks)); | 106 CallbackWrapper* wrapper = new CallbackWrapper(std::move(callbacks)); |
| 107 requestFileSystemAccessInternal(context, | 107 requestFileSystemAccessInternal(context, |
| 108 bind(&LocalFileSystem::deleteFileSystemInternal, wrapPersistent(this), w
rapPersistent(context), type, wrapPersistent(wrapper)), | 108 WTF::bind(&LocalFileSystem::deleteFileSystemInternal, wrapPersistent(thi
s), wrapPersistent(context), type, wrapPersistent(wrapper)), |
| 109 bind(&LocalFileSystem::fileSystemNotAllowedInternal, wrapPersistent(this
), wrapPersistent(context), wrapPersistent(wrapper))); | 109 WTF::bind(&LocalFileSystem::fileSystemNotAllowedInternal, wrapPersistent
(this), wrapPersistent(context), wrapPersistent(wrapper))); |
| 110 } | 110 } |
| 111 | 111 |
| 112 WebFileSystem* LocalFileSystem::getFileSystem() const | 112 WebFileSystem* LocalFileSystem::getFileSystem() const |
| 113 { | 113 { |
| 114 Platform* platform = Platform::current(); | 114 Platform* platform = Platform::current(); |
| 115 if (!platform) | 115 if (!platform) |
| 116 return nullptr; | 116 return nullptr; |
| 117 | 117 |
| 118 return platform->fileSystem(); | 118 return platform->fileSystem(); |
| 119 } | 119 } |
| (...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 214 { | 214 { |
| 215 frame.provideSupplement(LocalFileSystem::supplementName(), LocalFileSystem::
create(std::move(client))); | 215 frame.provideSupplement(LocalFileSystem::supplementName(), LocalFileSystem::
create(std::move(client))); |
| 216 } | 216 } |
| 217 | 217 |
| 218 void provideLocalFileSystemToWorker(WorkerClients* clients, std::unique_ptr<File
SystemClient> client) | 218 void provideLocalFileSystemToWorker(WorkerClients* clients, std::unique_ptr<File
SystemClient> client) |
| 219 { | 219 { |
| 220 clients->provideSupplement(LocalFileSystem::supplementName(), LocalFileSyste
m::create(std::move(client))); | 220 clients->provideSupplement(LocalFileSystem::supplementName(), LocalFileSyste
m::create(std::move(client))); |
| 221 } | 221 } |
| 222 | 222 |
| 223 } // namespace blink | 223 } // namespace blink |
| OLD | NEW |