OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2009 Google Inc. All rights reserved. | 2 * Copyright (C) 2009 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 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
157 fileMetadata.length = item.fileSystemFileSize; | 157 fileMetadata.length = item.fileSystemFileSize; |
158 m_private->add(File::createForFileSystemFile(item.fileSystemURL, fil
eMetadata)); | 158 m_private->add(File::createForFileSystemFile(item.fileSystemURL, fil
eMetadata)); |
159 } | 159 } |
160 return; | 160 return; |
161 } | 161 } |
162 } | 162 } |
163 | 163 |
164 WebString WebDragData::filesystemId() const | 164 WebString WebDragData::filesystemId() const |
165 { | 165 { |
166 ASSERT(!isNull()); | 166 ASSERT(!isNull()); |
167 DraggedIsolatedFileSystem* filesystem = DraggedIsolatedFileSystem::from(m_pr
ivate.get()); | 167 return m_private.get()->filesystemId(); |
168 if (filesystem) | |
169 return filesystem->filesystemId(); | |
170 return WebString(); | |
171 } | 168 } |
172 | 169 |
173 void WebDragData::setFilesystemId(const WebString& filesystemId) | 170 void WebDragData::setFilesystemId(const WebString& filesystemId) |
174 { | 171 { |
175 // The ID is an opaque string, given by and validated by chromium port. | 172 // The ID is an opaque string, given by and validated by chromium port. |
176 ensureMutable(); | 173 ensureMutable(); |
177 DraggedIsolatedFileSystem::provideTo(*m_private.get(), DraggedIsolatedFileSy
stem::supplementName(), DraggedIsolatedFileSystem::create(filesystemId)); | 174 DraggedIsolatedFileSystem::provideTo(*m_private.get(), DraggedIsolatedFileSy
stem::supplementName(), DraggedIsolatedFileSystem::create(*m_private.get(), file
systemId)); |
178 } | 175 } |
179 | 176 |
180 } // namespace blink | 177 } // namespace blink |
OLD | NEW |