| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2010 Google Inc. All rights reserved. | 2 * Copyright (C) 2010 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 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 114 | 114 |
| 115 namespace { | 115 namespace { |
| 116 | 116 |
| 117 class ConvertToFileWriterCallback : public FileWriterBaseCallback { | 117 class ConvertToFileWriterCallback : public FileWriterBaseCallback { |
| 118 public: | 118 public: |
| 119 static PassOwnPtr<ConvertToFileWriterCallback> create(PassOwnPtr<FileWriterC
allback> callback) | 119 static PassOwnPtr<ConvertToFileWriterCallback> create(PassOwnPtr<FileWriterC
allback> callback) |
| 120 { | 120 { |
| 121 return adoptPtr(new ConvertToFileWriterCallback(callback)); | 121 return adoptPtr(new ConvertToFileWriterCallback(callback)); |
| 122 } | 122 } |
| 123 | 123 |
| 124 bool handleEvent(FileWriterBase* fileWriterBase) | 124 void handleEvent(FileWriterBase* fileWriterBase) |
| 125 { | 125 { |
| 126 return m_callback->handleEvent(static_cast<FileWriter*>(fileWriterBase))
; | 126 m_callback->handleEvent(static_cast<FileWriter*>(fileWriterBase)); |
| 127 } | 127 } |
| 128 private: | 128 private: |
| 129 ConvertToFileWriterCallback(PassOwnPtr<FileWriterCallback> callback) | 129 ConvertToFileWriterCallback(PassOwnPtr<FileWriterCallback> callback) |
| 130 : m_callback(callback) | 130 : m_callback(callback) |
| 131 { | 131 { |
| 132 } | 132 } |
| 133 OwnPtr<FileWriterCallback> m_callback; | 133 OwnPtr<FileWriterCallback> m_callback; |
| 134 }; | 134 }; |
| 135 | 135 |
| 136 } | 136 } |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 197 | 197 |
| 198 } // namespace | 198 } // namespace |
| 199 | 199 |
| 200 void DOMFileSystem::createFile(const FileEntry* fileEntry, PassOwnPtr<FileCallba
ck> successCallback, PassOwnPtr<ErrorCallback> errorCallback) | 200 void DOMFileSystem::createFile(const FileEntry* fileEntry, PassOwnPtr<FileCallba
ck> successCallback, PassOwnPtr<ErrorCallback> errorCallback) |
| 201 { | 201 { |
| 202 KURL fileSystemURL = createFileSystemURL(fileEntry); | 202 KURL fileSystemURL = createFileSystemURL(fileEntry); |
| 203 fileSystem()->createSnapshotFileAndReadMetadata(fileSystemURL, SnapshotFileC
allback::create(this, fileEntry->name(), fileSystemURL, successCallback, errorCa
llback)); | 203 fileSystem()->createSnapshotFileAndReadMetadata(fileSystemURL, SnapshotFileC
allback::create(this, fileEntry->name(), fileSystemURL, successCallback, errorCa
llback)); |
| 204 } | 204 } |
| 205 | 205 |
| 206 } // namespace WebCore | 206 } // namespace WebCore |
| OLD | NEW |