| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2008, 2009, 2012 Google Inc. All rights reserved. | 2 * Copyright (c) 2008, 2009, 2012 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 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 148 for (size_t i = 0; i < m_itemList.size(); ++i) { | 148 for (size_t i = 0; i < m_itemList.size(); ++i) { |
| 149 if (m_itemList[i]->kind() == DataTransferItem::kindString && m_itemList[
i]->type() == type) | 149 if (m_itemList[i]->kind() == DataTransferItem::kindString && m_itemList[
i]->type() == type) |
| 150 return m_itemList[i]->internalGetAsString(); | 150 return m_itemList[i]->internalGetAsString(); |
| 151 } | 151 } |
| 152 return String(); | 152 return String(); |
| 153 } | 153 } |
| 154 | 154 |
| 155 bool ChromiumDataObject::setData(const String& type, const String& data) | 155 bool ChromiumDataObject::setData(const String& type, const String& data) |
| 156 { | 156 { |
| 157 clearData(type); | 157 clearData(type); |
| 158 add(data, type, ASSERT_NO_EXCEPTION_STATE); | 158 add(data, type, ASSERT_NO_EXCEPTION); |
| 159 return true; | 159 return true; |
| 160 } | 160 } |
| 161 | 161 |
| 162 void ChromiumDataObject::urlAndTitle(String& url, String* title) const | 162 void ChromiumDataObject::urlAndTitle(String& url, String* title) const |
| 163 { | 163 { |
| 164 RefPtr<ChromiumDataObjectItem> item = findStringItem(mimeTypeTextURIList); | 164 RefPtr<ChromiumDataObjectItem> item = findStringItem(mimeTypeTextURIList); |
| 165 if (!item) | 165 if (!item) |
| 166 return; | 166 return; |
| 167 url = convertURIListToURL(item->internalGetAsString()); | 167 url = convertURIListToURL(item->internalGetAsString()); |
| 168 if (title) | 168 if (title) |
| (...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 249 return true; | 249 return true; |
| 250 } | 250 } |
| 251 | 251 |
| 252 void ChromiumDataObject::internalAddFileItem(PassRefPtr<ChromiumDataObjectItem>
item) | 252 void ChromiumDataObject::internalAddFileItem(PassRefPtr<ChromiumDataObjectItem>
item) |
| 253 { | 253 { |
| 254 ASSERT(item->kind() == DataTransferItem::kindFile); | 254 ASSERT(item->kind() == DataTransferItem::kindFile); |
| 255 m_itemList.append(item); | 255 m_itemList.append(item); |
| 256 } | 256 } |
| 257 | 257 |
| 258 } // namespace WebCore | 258 } // namespace WebCore |
| OLD | NEW |