| 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 21 matching lines...) Expand all Loading... |
| 32 #include "core/clipboard/DataObject.h" | 32 #include "core/clipboard/DataObject.h" |
| 33 | 33 |
| 34 #include "core/clipboard/Pasteboard.h" | 34 #include "core/clipboard/Pasteboard.h" |
| 35 #include "platform/clipboard/ClipboardMimeTypes.h" | 35 #include "platform/clipboard/ClipboardMimeTypes.h" |
| 36 #include "platform/clipboard/ClipboardUtilities.h" | 36 #include "platform/clipboard/ClipboardUtilities.h" |
| 37 #include "public/platform/Platform.h" | 37 #include "public/platform/Platform.h" |
| 38 #include "public/platform/WebClipboard.h" | 38 #include "public/platform/WebClipboard.h" |
| 39 | 39 |
| 40 namespace WebCore { | 40 namespace WebCore { |
| 41 | 41 |
| 42 DEFINE_GC_INFO(DataObject); | |
| 43 | |
| 44 PassRefPtrWillBeRawPtr<DataObject> DataObject::createFromPasteboard(PasteMode pa
steMode) | 42 PassRefPtrWillBeRawPtr<DataObject> DataObject::createFromPasteboard(PasteMode pa
steMode) |
| 45 { | 43 { |
| 46 RefPtrWillBeRawPtr<DataObject> dataObject = create(); | 44 RefPtrWillBeRawPtr<DataObject> dataObject = create(); |
| 47 blink::WebClipboard::Buffer buffer = Pasteboard::generalPasteboard()->buffer
(); | 45 blink::WebClipboard::Buffer buffer = Pasteboard::generalPasteboard()->buffer
(); |
| 48 uint64_t sequenceNumber = blink::Platform::current()->clipboard()->sequenceN
umber(buffer); | 46 uint64_t sequenceNumber = blink::Platform::current()->clipboard()->sequenceN
umber(buffer); |
| 49 bool ignored; | 47 bool ignored; |
| 50 blink::WebVector<blink::WebString> webTypes = blink::Platform::current()->cl
ipboard()->readAvailableTypes(buffer, &ignored); | 48 blink::WebVector<blink::WebString> webTypes = blink::Platform::current()->cl
ipboard()->readAvailableTypes(buffer, &ignored); |
| 51 ListHashSet<String> types; | 49 ListHashSet<String> types; |
| 52 for (size_t i = 0; i < webTypes.size(); ++i) | 50 for (size_t i = 0; i < webTypes.size(); ++i) |
| 53 types.add(webTypes[i]); | 51 types.add(webTypes[i]); |
| (...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 266 ASSERT(item->kind() == DataObjectItem::FileKind); | 264 ASSERT(item->kind() == DataObjectItem::FileKind); |
| 267 m_itemList.append(item); | 265 m_itemList.append(item); |
| 268 } | 266 } |
| 269 | 267 |
| 270 void DataObject::trace(Visitor* visitor) | 268 void DataObject::trace(Visitor* visitor) |
| 271 { | 269 { |
| 272 visitor->trace(m_itemList); | 270 visitor->trace(m_itemList); |
| 273 } | 271 } |
| 274 | 272 |
| 275 } // namespace WebCore | 273 } // namespace WebCore |
| OLD | NEW |