OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2012, Google Inc. All rights reserved. | 2 * Copyright (C) 2012, 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 met: | 5 * modification, are permitted provided that the following conditions are met: |
6 * | 6 * |
7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
61 DOMFileSystem::scheduleCallback(document, errorCallback, FileError::crea
te(FileError::SECURITY_ERR)); | 61 DOMFileSystem::scheduleCallback(document, errorCallback, FileError::crea
te(FileError::SECURITY_ERR)); |
62 return; | 62 return; |
63 } | 63 } |
64 | 64 |
65 FileSystemType fileSystemType = static_cast<FileSystemType>(type); | 65 FileSystemType fileSystemType = static_cast<FileSystemType>(type); |
66 if (!DOMFileSystemBase::isValidType(fileSystemType)) { | 66 if (!DOMFileSystemBase::isValidType(fileSystemType)) { |
67 DOMFileSystem::scheduleCallback(document, errorCallback, FileError::crea
te(FileError::INVALID_MODIFICATION_ERR)); | 67 DOMFileSystem::scheduleCallback(document, errorCallback, FileError::crea
te(FileError::INVALID_MODIFICATION_ERR)); |
68 return; | 68 return; |
69 } | 69 } |
70 | 70 |
71 LocalFileSystem::from(*document)->requestFileSystem(document, fileSystemType
, size, FileSystemCallbacks::create(successCallback, errorCallback, document, fi
leSystemType)); | 71 LocalFileSystem::from(*document)->requestFileSystemAsync(document, fileSyste
mType, size, FileSystemCallbacks::create(successCallback, errorCallback, documen
t, fileSystemType)); |
72 } | 72 } |
73 | 73 |
74 void DOMWindowFileSystem::webkitResolveLocalFileSystemURL(DOMWindow& window, con
st String& url, PassOwnPtr<EntryCallback> successCallback, PassOwnPtr<ErrorCallb
ack> errorCallback) | 74 void DOMWindowFileSystem::webkitResolveLocalFileSystemURL(DOMWindow& window, con
st String& url, PassOwnPtr<EntryCallback> successCallback, PassOwnPtr<ErrorCallb
ack> errorCallback) |
75 { | 75 { |
76 if (!window.isCurrentlyDisplayedInFrame()) | 76 if (!window.isCurrentlyDisplayedInFrame()) |
77 return; | 77 return; |
78 | 78 |
79 Document* document = window.document(); | 79 Document* document = window.document(); |
80 if (!document) | 80 if (!document) |
81 return; | 81 return; |
(...skipping 10 matching lines...) Expand all Loading... |
92 return; | 92 return; |
93 } | 93 } |
94 | 94 |
95 LocalFileSystem::from(*document)->resolveURL(document, completedURL, Resolve
URICallbacks::create(successCallback, errorCallback, document)); | 95 LocalFileSystem::from(*document)->resolveURL(document, completedURL, Resolve
URICallbacks::create(successCallback, errorCallback, document)); |
96 } | 96 } |
97 | 97 |
98 COMPILE_ASSERT(static_cast<int>(DOMWindowFileSystem::TEMPORARY) == static_cast<i
nt>(FileSystemTypeTemporary), enum_mismatch); | 98 COMPILE_ASSERT(static_cast<int>(DOMWindowFileSystem::TEMPORARY) == static_cast<i
nt>(FileSystemTypeTemporary), enum_mismatch); |
99 COMPILE_ASSERT(static_cast<int>(DOMWindowFileSystem::PERSISTENT) == static_cast<
int>(FileSystemTypePersistent), enum_mismatch); | 99 COMPILE_ASSERT(static_cast<int>(DOMWindowFileSystem::PERSISTENT) == static_cast<
int>(FileSystemTypePersistent), enum_mismatch); |
100 | 100 |
101 } // namespace WebCore | 101 } // namespace WebCore |
OLD | NEW |