| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2011 Google Inc. All rights reserved. | 2 * Copyright (C) 2011 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 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 51 static PassRefPtr<ChromiumDataObjectItem> createFromString(const String& typ
e, const String& data); | 51 static PassRefPtr<ChromiumDataObjectItem> createFromString(const String& typ
e, const String& data); |
| 52 static PassRefPtr<ChromiumDataObjectItem> createFromFile(PassRefPtr<File>); | 52 static PassRefPtr<ChromiumDataObjectItem> createFromFile(PassRefPtr<File>); |
| 53 static PassRefPtr<ChromiumDataObjectItem> createFromURL(const String& url, c
onst String& title); | 53 static PassRefPtr<ChromiumDataObjectItem> createFromURL(const String& url, c
onst String& title); |
| 54 static PassRefPtr<ChromiumDataObjectItem> createFromHTML(const String& html,
const KURL& baseURL); | 54 static PassRefPtr<ChromiumDataObjectItem> createFromHTML(const String& html,
const KURL& baseURL); |
| 55 static PassRefPtr<ChromiumDataObjectItem> createFromSharedBuffer(const Strin
g& filename, PassRefPtr<SharedBuffer>); | 55 static PassRefPtr<ChromiumDataObjectItem> createFromSharedBuffer(const Strin
g& filename, PassRefPtr<SharedBuffer>); |
| 56 static PassRefPtr<ChromiumDataObjectItem> createFromPasteboard(const String&
type, uint64_t sequenceNumber); | 56 static PassRefPtr<ChromiumDataObjectItem> createFromPasteboard(const String&
type, uint64_t sequenceNumber); |
| 57 | 57 |
| 58 String kind() const { return m_kind; } | 58 String kind() const { return m_kind; } |
| 59 String type() const { return m_type; } | 59 String type() const { return m_type; } |
| 60 void getAsString(PassRefPtr<StringCallback>, ScriptExecutionContext*) const; | 60 void getAsString(PassRefPtr<StringCallback>, ScriptExecutionContext*) const; |
| 61 PassRefPtr<Blob> getAsFile() const; | 61 PassRefPtr<Blob> getAsFile() const; // TODO: BlobDataHandles |
| 62 | 62 |
| 63 // Used to support legacy DataTransfer APIs and renderer->browser serializat
ion. | 63 // Used to support legacy DataTransfer APIs and renderer->browser serializat
ion. |
| 64 String internalGetAsString() const; | 64 String internalGetAsString() const; |
| 65 PassRefPtr<SharedBuffer> sharedBuffer() const { return m_sharedBuffer; } | 65 PassRefPtr<SharedBuffer> sharedBuffer() const { return m_sharedBuffer; } |
| 66 String title() const { return m_title; } | 66 String title() const { return m_title; } |
| 67 KURL baseURL() const { return m_baseURL; } | 67 KURL baseURL() const { return m_baseURL; } |
| 68 bool isFilename() const; | 68 bool isFilename() const; |
| 69 | 69 |
| 70 private: | 70 private: |
| 71 enum DataSource { | 71 enum DataSource { |
| (...skipping 16 matching lines...) Expand all Loading... |
| 88 KURL m_baseURL; | 88 KURL m_baseURL; |
| 89 | 89 |
| 90 uint64_t m_sequenceNumber; // Only valid when m_source == PasteboardSource | 90 uint64_t m_sequenceNumber; // Only valid when m_source == PasteboardSource |
| 91 }; | 91 }; |
| 92 | 92 |
| 93 } // namespace WebCore | 93 } // namespace WebCore |
| 94 | 94 |
| 95 #endif // ENABLE(DATA_TRANSFER_ITEMS) | 95 #endif // ENABLE(DATA_TRANSFER_ITEMS) |
| 96 | 96 |
| 97 #endif // ChromiumDataObjectItem_h | 97 #endif // ChromiumDataObjectItem_h |
| OLD | NEW |