| 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 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 135 DraggedIsolatedFileSystem* filesystem = DraggedIsolatedFileSystem::from(m_pr
ivate); | 135 DraggedIsolatedFileSystem* filesystem = DraggedIsolatedFileSystem::from(m_pr
ivate); |
| 136 if (filesystem) | 136 if (filesystem) |
| 137 return filesystem->filesystemId(); | 137 return filesystem->filesystemId(); |
| 138 return WebString(); | 138 return WebString(); |
| 139 } | 139 } |
| 140 | 140 |
| 141 void WebDragData::setFilesystemId(const WebString& filesystemId) | 141 void WebDragData::setFilesystemId(const WebString& filesystemId) |
| 142 { | 142 { |
| 143 // The ID is an opaque string, given by and validated by chromium port. | 143 // The ID is an opaque string, given by and validated by chromium port. |
| 144 ensureMutable(); | 144 ensureMutable(); |
| 145 DraggedIsolatedFileSystem::provideTo(m_private, DraggedIsolatedFileSystem::s
upplementName(), DraggedIsolatedFileSystem::create(filesystemId)); | 145 ASSERT(m_private); |
| 146 DraggedIsolatedFileSystem::provideTo(*m_private, DraggedIsolatedFileSystem::
supplementName(), DraggedIsolatedFileSystem::create(filesystemId)); |
| 146 } | 147 } |
| 147 | 148 |
| 148 WebDragData::WebDragData(const WTF::PassRefPtr<WebCore::DataObject>& data) | 149 WebDragData::WebDragData(const WTF::PassRefPtr<WebCore::DataObject>& data) |
| 149 : m_private(static_cast<WebDragDataPrivate*>(data.leakRef())) | 150 : m_private(static_cast<WebDragDataPrivate*>(data.leakRef())) |
| 150 { | 151 { |
| 151 } | 152 } |
| 152 | 153 |
| 153 WebDragData& WebDragData::operator=(const WTF::PassRefPtr<WebCore::DataObject>&
data) | 154 WebDragData& WebDragData::operator=(const WTF::PassRefPtr<WebCore::DataObject>&
data) |
| 154 { | 155 { |
| 155 assign(static_cast<WebDragDataPrivate*>(data.leakRef())); | 156 assign(static_cast<WebDragDataPrivate*>(data.leakRef())); |
| (...skipping 13 matching lines...) Expand all Loading... |
| 169 m_private = p; | 170 m_private = p; |
| 170 } | 171 } |
| 171 | 172 |
| 172 void WebDragData::ensureMutable() | 173 void WebDragData::ensureMutable() |
| 173 { | 174 { |
| 174 ASSERT(!isNull()); | 175 ASSERT(!isNull()); |
| 175 ASSERT(m_private->hasOneRef()); | 176 ASSERT(m_private->hasOneRef()); |
| 176 } | 177 } |
| 177 | 178 |
| 178 } // namespace blink | 179 } // namespace blink |
| OLD | NEW |