| 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 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 87 | 87 |
| 88 void ChromiumDataObject::clearAll() | 88 void ChromiumDataObject::clearAll() |
| 89 { | 89 { |
| 90 m_itemList.clear(); | 90 m_itemList.clear(); |
| 91 } | 91 } |
| 92 | 92 |
| 93 PassRefPtr<ChromiumDataObjectItem> ChromiumDataObject::add(const String& data, c
onst String& type, ExceptionState& es) | 93 PassRefPtr<ChromiumDataObjectItem> ChromiumDataObject::add(const String& data, c
onst String& type, ExceptionState& es) |
| 94 { | 94 { |
| 95 RefPtr<ChromiumDataObjectItem> item = ChromiumDataObjectItem::createFromStri
ng(type, data); | 95 RefPtr<ChromiumDataObjectItem> item = ChromiumDataObjectItem::createFromStri
ng(type, data); |
| 96 if (!internalAddStringItem(item)) { | 96 if (!internalAddStringItem(item)) { |
| 97 es.throwDOMException(NotSupportedError); | 97 es.throwUninformativeAndGenericDOMException(NotSupportedError); |
| 98 return 0; | 98 return 0; |
| 99 } | 99 } |
| 100 return item; | 100 return item; |
| 101 } | 101 } |
| 102 | 102 |
| 103 PassRefPtr<ChromiumDataObjectItem> ChromiumDataObject::add(PassRefPtr<File> file
, ScriptExecutionContext* context) | 103 PassRefPtr<ChromiumDataObjectItem> ChromiumDataObject::add(PassRefPtr<File> file
, ScriptExecutionContext* context) |
| 104 { | 104 { |
| 105 if (!file) | 105 if (!file) |
| 106 return 0; | 106 return 0; |
| 107 | 107 |
| (...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 255 return true; | 255 return true; |
| 256 } | 256 } |
| 257 | 257 |
| 258 void ChromiumDataObject::internalAddFileItem(PassRefPtr<ChromiumDataObjectItem>
item) | 258 void ChromiumDataObject::internalAddFileItem(PassRefPtr<ChromiumDataObjectItem>
item) |
| 259 { | 259 { |
| 260 ASSERT(item->kind() == DataTransferItem::kindFile); | 260 ASSERT(item->kind() == DataTransferItem::kindFile); |
| 261 m_itemList.append(item); | 261 m_itemList.append(item); |
| 262 } | 262 } |
| 263 | 263 |
| 264 } // namespace WebCore | 264 } // namespace WebCore |
| OLD | NEW |