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 199 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
210 { | 210 { |
211 internalAddFileItem(DataObjectItem::createFromFile(File::createForUserProvid
edFile(filename, displayName))); | 211 internalAddFileItem(DataObjectItem::createFromFile(File::createForUserProvid
edFile(filename, displayName))); |
212 } | 212 } |
213 | 213 |
214 void DataObject::addSharedBuffer(const String& name, PassRefPtr<SharedBuffer> bu
ffer) | 214 void DataObject::addSharedBuffer(const String& name, PassRefPtr<SharedBuffer> bu
ffer) |
215 { | 215 { |
216 internalAddFileItem(DataObjectItem::createFromSharedBuffer(name, buffer)); | 216 internalAddFileItem(DataObjectItem::createFromSharedBuffer(name, buffer)); |
217 } | 217 } |
218 | 218 |
219 DataObject::DataObject() | 219 DataObject::DataObject() |
220 : m_modifierKeyState(0) | 220 : m_modifiers(0) |
221 { | 221 { |
222 } | 222 } |
223 | 223 |
224 PassRefPtrWillBeRawPtr<DataObjectItem> DataObject::findStringItem(const String&
type) const | 224 PassRefPtrWillBeRawPtr<DataObjectItem> DataObject::findStringItem(const String&
type) const |
225 { | 225 { |
226 for (size_t i = 0; i < m_itemList.size(); ++i) { | 226 for (size_t i = 0; i < m_itemList.size(); ++i) { |
227 if (m_itemList[i]->kind() == DataObjectItem::StringKind && m_itemList[i]
->type() == type) | 227 if (m_itemList[i]->kind() == DataObjectItem::StringKind && m_itemList[i]
->type() == type) |
228 return m_itemList[i]; | 228 return m_itemList[i]; |
229 } | 229 } |
230 return nullptr; | 230 return nullptr; |
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
341 } | 341 } |
342 item.title = originalItem->title(); | 342 item.title = originalItem->title(); |
343 item.baseURL = originalItem->baseURL(); | 343 item.baseURL = originalItem->baseURL(); |
344 itemList[i] = item; | 344 itemList[i] = item; |
345 } | 345 } |
346 data.swapItems(itemList); | 346 data.swapItems(itemList); |
347 return data; | 347 return data; |
348 } | 348 } |
349 | 349 |
350 } // namespace blink | 350 } // namespace blink |
OLD | NEW |