| 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 209 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 220 ClipboardAccessPolicy policy, | 220 ClipboardAccessPolicy policy, |
| 221 Frame* frame) | 221 Frame* frame) |
| 222 : Clipboard(policy, clipboardType) | 222 : Clipboard(policy, clipboardType) |
| 223 , m_dataObject(dataObject) | 223 , m_dataObject(dataObject) |
| 224 , m_frame(frame) | 224 , m_frame(frame) |
| 225 { | 225 { |
| 226 } | 226 } |
| 227 | 227 |
| 228 ClipboardChromium::~ClipboardChromium() | 228 ClipboardChromium::~ClipboardChromium() |
| 229 { | 229 { |
| 230 if (m_dragImage) |
| 231 m_dragImage->removeClient(this); |
| 230 } | 232 } |
| 231 | 233 |
| 232 PassRefPtr<ClipboardChromium> ClipboardChromium::create(ClipboardType clipboardT
ype, | 234 PassRefPtr<ClipboardChromium> ClipboardChromium::create(ClipboardType clipboardT
ype, |
| 233 PassRefPtr<ChromiumDataObject> dataObject, ClipboardAccessPolicy policy, Fra
me* frame) | 235 PassRefPtr<ChromiumDataObject> dataObject, ClipboardAccessPolicy policy, Fra
me* frame) |
| 234 { | 236 { |
| 235 return adoptRef(new ClipboardChromium(clipboardType, dataObject, policy, fra
me)); | 237 return adoptRef(new ClipboardChromium(clipboardType, dataObject, policy, fra
me)); |
| 236 } | 238 } |
| 237 | 239 |
| 238 void ClipboardChromium::clearData(const String& type) | 240 void ClipboardChromium::clearData(const String& type) |
| 239 { | 241 { |
| (...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 458 PassRefPtr<DataTransferItemList> ClipboardChromium::items() | 460 PassRefPtr<DataTransferItemList> ClipboardChromium::items() |
| 459 { | 461 { |
| 460 // FIXME: According to the spec, we are supposed to return the same collecti
on of items each | 462 // FIXME: According to the spec, we are supposed to return the same collecti
on of items each |
| 461 // time. We now return a wrapper that always wraps the *same* set of items,
so JS shouldn't be | 463 // time. We now return a wrapper that always wraps the *same* set of items,
so JS shouldn't be |
| 462 // able to tell, but we probably still want to fix this. | 464 // able to tell, but we probably still want to fix this. |
| 463 return DataTransferItemListPolicyWrapper::create(this, m_dataObject); | 465 return DataTransferItemListPolicyWrapper::create(this, m_dataObject); |
| 464 } | 466 } |
| 465 #endif | 467 #endif |
| 466 | 468 |
| 467 } // namespace WebCore | 469 } // namespace WebCore |
| OLD | NEW |