| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2007 Apple Inc. All rights reserved. | 2 * Copyright (C) 2007 Apple Inc. All rights reserved. |
| 3 * Copyright (C) 2013 Google Inc. | 3 * Copyright (C) 2013 Google Inc. |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
| 7 * are met: | 7 * are met: |
| 8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. 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 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 81 | 81 |
| 82 void DragData::asFilePaths(Vector<String>& result) const | 82 void DragData::asFilePaths(Vector<String>& result) const |
| 83 { | 83 { |
| 84 const Vector<String>& filenames = m_platformDragData->filenames(); | 84 const Vector<String>& filenames = m_platformDragData->filenames(); |
| 85 for (size_t i = 0; i < filenames.size(); ++i) { | 85 for (size_t i = 0; i < filenames.size(); ++i) { |
| 86 if (!filenames[i].isEmpty()) | 86 if (!filenames[i].isEmpty()) |
| 87 result.append(filenames[i]); | 87 result.append(filenames[i]); |
| 88 } | 88 } |
| 89 } | 89 } |
| 90 | 90 |
| 91 unsigned DragData::numberOfFiles() const |
| 92 { |
| 93 return m_platformDragData->filenames().size(); |
| 94 } |
| 95 |
| 91 bool DragData::containsPlainText() const | 96 bool DragData::containsPlainText() const |
| 92 { | 97 { |
| 93 return m_platformDragData->types().contains(mimeTypeTextPlain); | 98 return m_platformDragData->types().contains(mimeTypeTextPlain); |
| 94 } | 99 } |
| 95 | 100 |
| 96 String DragData::asPlainText() const | 101 String DragData::asPlainText() const |
| 97 { | 102 { |
| 98 return m_platformDragData->getData(mimeTypeTextPlain); | 103 return m_platformDragData->getData(mimeTypeTextPlain); |
| 99 } | 104 } |
| 100 | 105 |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 144 | 149 |
| 145 return nullptr; | 150 return nullptr; |
| 146 } | 151 } |
| 147 | 152 |
| 148 String DragData::droppedFileSystemId() const | 153 String DragData::droppedFileSystemId() const |
| 149 { | 154 { |
| 150 return m_platformDragData->filesystemId(); | 155 return m_platformDragData->filesystemId(); |
| 151 } | 156 } |
| 152 | 157 |
| 153 } // namespace blink | 158 } // namespace blink |
| OLD | NEW |