| 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 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 53 void WebDragData::reset() | 53 void WebDragData::reset() |
| 54 { | 54 { |
| 55 m_private.reset(); | 55 m_private.reset(); |
| 56 } | 56 } |
| 57 | 57 |
| 58 void WebDragData::assign(const WebDragData& other) | 58 void WebDragData::assign(const WebDragData& other) |
| 59 { | 59 { |
| 60 m_private = other.m_private; | 60 m_private = other.m_private; |
| 61 } | 61 } |
| 62 | 62 |
| 63 WebDragData::WebDragData(const PassRefPtrWillBeRawPtr<DataObject>& object) | |
| 64 { | |
| 65 m_private = object; | |
| 66 } | |
| 67 | |
| 68 WebDragData& WebDragData::operator=(const PassRefPtrWillBeRawPtr<DataObject>& ob
ject) | |
| 69 { | |
| 70 m_private = object; | |
| 71 return *this; | |
| 72 } | |
| 73 | |
| 74 DataObject* WebDragData::getValue() const | |
| 75 { | |
| 76 return m_private.get(); | |
| 77 } | |
| 78 | |
| 79 void WebDragData::ensureMutable() | 63 void WebDragData::ensureMutable() |
| 80 { | 64 { |
| 81 ASSERT(!isNull()); | 65 ASSERT(!isNull()); |
| 82 } | 66 } |
| 83 | 67 |
| 84 WebVector<WebDragData::Item> WebDragData::items() const | 68 WebVector<WebDragData::Item> WebDragData::items() const |
| 85 { | 69 { |
| 86 Vector<Item> itemList; | 70 Vector<Item> itemList; |
| 87 for (size_t i = 0; i < m_private->length(); ++i) { | 71 for (size_t i = 0; i < m_private->length(); ++i) { |
| 88 DataObjectItem* originalItem = m_private->item(i).get(); | 72 DataObjectItem* originalItem = m_private->item(i).get(); |
| (...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 173 } | 157 } |
| 174 | 158 |
| 175 void WebDragData::setFilesystemId(const WebString& filesystemId) | 159 void WebDragData::setFilesystemId(const WebString& filesystemId) |
| 176 { | 160 { |
| 177 // The ID is an opaque string, given by and validated by chromium port. | 161 // The ID is an opaque string, given by and validated by chromium port. |
| 178 ensureMutable(); | 162 ensureMutable(); |
| 179 DraggedIsolatedFileSystem::provideTo(*m_private.get(), DraggedIsolatedFileSy
stem::supplementName(), DraggedIsolatedFileSystem::create(*m_private.get(), file
systemId)); | 163 DraggedIsolatedFileSystem::provideTo(*m_private.get(), DraggedIsolatedFileSy
stem::supplementName(), DraggedIsolatedFileSystem::create(*m_private.get(), file
systemId)); |
| 180 } | 164 } |
| 181 | 165 |
| 182 } // namespace blink | 166 } // namespace blink |
| OLD | NEW |