| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2006, 2007 Apple Inc. All rights reserved. | 2 * Copyright (C) 2006, 2007 Apple Inc. All rights reserved. |
| 3 * Copyright (C) 2008, 2009 Google Inc. | 3 * Copyright (C) 2008, 2009 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 228 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 239 { | 239 { |
| 240 return adoptRef(new ClipboardChromium(clipboardType, dataObject, policy, fra
me)); | 240 return adoptRef(new ClipboardChromium(clipboardType, dataObject, policy, fra
me)); |
| 241 } | 241 } |
| 242 | 242 |
| 243 void ClipboardChromium::clearData(const String& type) | 243 void ClipboardChromium::clearData(const String& type) |
| 244 { | 244 { |
| 245 if (!canWriteData()) | 245 if (!canWriteData()) |
| 246 return; | 246 return; |
| 247 | 247 |
| 248 m_dataObject->clearData(normalizeType(type)); | 248 m_dataObject->clearData(normalizeType(type)); |
| 249 | |
| 250 ASSERT_NOT_REACHED(); | |
| 251 } | 249 } |
| 252 | 250 |
| 253 void ClipboardChromium::clearAllData() | 251 void ClipboardChromium::clearAllData() |
| 254 { | 252 { |
| 255 if (!canWriteData()) | 253 if (!canWriteData()) |
| 256 return; | 254 return; |
| 257 | 255 |
| 258 m_dataObject->clearAll(); | 256 m_dataObject->clearAll(); |
| 259 } | 257 } |
| 260 | 258 |
| (...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 472 | 470 |
| 473 PassRefPtr<DataTransferItemList> ClipboardChromium::items() | 471 PassRefPtr<DataTransferItemList> ClipboardChromium::items() |
| 474 { | 472 { |
| 475 // FIXME: According to the spec, we are supposed to return the same collecti
on of items each | 473 // FIXME: According to the spec, we are supposed to return the same collecti
on of items each |
| 476 // time. We now return a wrapper that always wraps the *same* set of items,
so JS shouldn't be | 474 // time. We now return a wrapper that always wraps the *same* set of items,
so JS shouldn't be |
| 477 // able to tell, but we probably still want to fix this. | 475 // able to tell, but we probably still want to fix this. |
| 478 return DataTransferItemListPolicyWrapper::create(this, m_dataObject); | 476 return DataTransferItemListPolicyWrapper::create(this, m_dataObject); |
| 479 } | 477 } |
| 480 | 478 |
| 481 } // namespace WebCore | 479 } // namespace WebCore |
| OLD | NEW |