Chromium Code Reviews| 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 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 49 { | 49 { |
| 50 callbacks->didFail(FileError::ABORT_ERR); | 50 callbacks->didFail(FileError::ABORT_ERR); |
| 51 } | 51 } |
| 52 | 52 |
| 53 } // namespace | 53 } // namespace |
| 54 | 54 |
| 55 LocalFileSystemBase::~LocalFileSystemBase() | 55 LocalFileSystemBase::~LocalFileSystemBase() |
| 56 { | 56 { |
| 57 } | 57 } |
| 58 | 58 |
| 59 void LocalFileSystemBase::readFileSystem(ScriptExecutionContext* context, FileSy stemType type, PassOwnPtr<AsyncFileSystemCallbacks> callbacks) | 59 void LocalFileSystemBase::resolveURL(ScriptExecutionContext* context, KURL fileS ystemURL, PassOwnPtr<AsyncFileSystemCallbacks> callbacks) |
| 60 { | 60 { |
| 61 if (!client() || !client()->allowFileSystem(context)) { | 61 if (!client() || !client()->allowFileSystem(context)) { |
| 62 context->postTask(createCallbackTask(&fileSystemNotAllowed, callbacks)); | 62 context->postTask(createCallbackTask(&fileSystemNotAllowed, callbacks)); |
| 63 return; | 63 return; |
| 64 } | 64 } |
| 65 client()->openFileSystem(context, type, callbacks, 0, OpenExistingFileSystem ); | 65 client()->resolveURL(fileSystemURL, callbacks); |
|
kinuko
2013/09/12 05:58:14
Hmm, looks like we can directly call WebKit::Platf
nhiroki
2013/09/12 09:08:06
Done. I'll make a separate patch for other functio
| |
| 66 } | 66 } |
| 67 | 67 |
| 68 void LocalFileSystemBase::requestFileSystem(ScriptExecutionContext* context, Fil eSystemType type, long long size, PassOwnPtr<AsyncFileSystemCallbacks> callbacks ) | 68 void LocalFileSystemBase::requestFileSystem(ScriptExecutionContext* context, Fil eSystemType type, long long size, PassOwnPtr<AsyncFileSystemCallbacks> callbacks ) |
| 69 { | 69 { |
| 70 if (!client() || !client()->allowFileSystem(context)) { | 70 if (!client() || !client()->allowFileSystem(context)) { |
| 71 context->postTask(createCallbackTask(&fileSystemNotAllowed, callbacks)); | 71 context->postTask(createCallbackTask(&fileSystemNotAllowed, callbacks)); |
| 72 return; | 72 return; |
| 73 } | 73 } |
| 74 client()->openFileSystem(context, type, callbacks, size, CreateFileSystemIfN otPresent); | 74 client()->openFileSystem(context, type, callbacks, size, CreateFileSystemIfN otPresent); |
| 75 } | 75 } |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 114 { | 114 { |
| 115 return static_cast<LocalFileSystem*>(Supplement<Page>::from(toDocument(conte xt)->page(), supplementName())); | 115 return static_cast<LocalFileSystem*>(Supplement<Page>::from(toDocument(conte xt)->page(), supplementName())); |
| 116 } | 116 } |
| 117 | 117 |
| 118 void provideLocalFileSystemTo(Page* page, PassOwnPtr<FileSystemClient> client) | 118 void provideLocalFileSystemTo(Page* page, PassOwnPtr<FileSystemClient> client) |
| 119 { | 119 { |
| 120 LocalFileSystem::provideTo(page, LocalFileSystem::supplementName(), LocalFil eSystem::create(client)); | 120 LocalFileSystem::provideTo(page, LocalFileSystem::supplementName(), LocalFil eSystem::create(client)); |
| 121 } | 121 } |
| 122 | 122 |
| 123 } // namespace WebCore | 123 } // namespace WebCore |
| OLD | NEW |