| 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 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 56 static DataObjectItem* createFromSharedBuffer(const String& filename, | 56 static DataObjectItem* createFromSharedBuffer(const String& filename, |
| 57 PassRefPtr<SharedBuffer>); | 57 PassRefPtr<SharedBuffer>); |
| 58 static DataObjectItem* createFromPasteboard(const String& type, | 58 static DataObjectItem* createFromPasteboard(const String& type, |
| 59 uint64_t sequenceNumber); | 59 uint64_t sequenceNumber); |
| 60 | 60 |
| 61 ItemKind kind() const { return m_kind; } | 61 ItemKind kind() const { return m_kind; } |
| 62 String type() const { return m_type; } | 62 String type() const { return m_type; } |
| 63 String getAsString() const; | 63 String getAsString() const; |
| 64 Blob* getAsFile() const; | 64 Blob* getAsFile() const; |
| 65 | 65 |
| 66 // Used to support legacy DataTransfer APIs and renderer->browser serializatio
n. | 66 // Used to support legacy DataTransfer APIs and renderer->browser |
| 67 // serialization. |
| 67 PassRefPtr<SharedBuffer> sharedBuffer() const { return m_sharedBuffer; } | 68 PassRefPtr<SharedBuffer> sharedBuffer() const { return m_sharedBuffer; } |
| 68 String title() const { return m_title; } | 69 String title() const { return m_title; } |
| 69 KURL baseURL() const { return m_baseURL; } | 70 KURL baseURL() const { return m_baseURL; } |
| 70 bool isFilename() const; | 71 bool isFilename() const; |
| 71 | 72 |
| 72 DECLARE_TRACE(); | 73 DECLARE_TRACE(); |
| 73 | 74 |
| 74 private: | 75 private: |
| 75 enum DataSource { | 76 enum DataSource { |
| 76 PasteboardSource, | 77 PasteboardSource, |
| (...skipping 13 matching lines...) Expand all Loading... |
| 90 // Optional metadata. Currently used for URL, HTML, and dragging files in. | 91 // Optional metadata. Currently used for URL, HTML, and dragging files in. |
| 91 String m_title; | 92 String m_title; |
| 92 KURL m_baseURL; | 93 KURL m_baseURL; |
| 93 | 94 |
| 94 uint64_t m_sequenceNumber; // Only valid when m_source == PasteboardSource | 95 uint64_t m_sequenceNumber; // Only valid when m_source == PasteboardSource |
| 95 }; | 96 }; |
| 96 | 97 |
| 97 } // namespace blink | 98 } // namespace blink |
| 98 | 99 |
| 99 #endif // DataObjectItem_h | 100 #endif // DataObjectItem_h |
| OLD | NEW |