Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 /* | 1 /* |
| 2 * Copyright (c) 2008, 2009, Google Inc. All rights reserved. | 2 * Copyright (c) 2008, 2009, 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 28 matching lines...) Expand all Loading... | |
| 39 #include "wtf/RefCounted.h" | 39 #include "wtf/RefCounted.h" |
| 40 #include "wtf/RefPtr.h" | 40 #include "wtf/RefPtr.h" |
| 41 #include "wtf/Vector.h" | 41 #include "wtf/Vector.h" |
| 42 #include "wtf/text/StringHash.h" | 42 #include "wtf/text/StringHash.h" |
| 43 #include "wtf/text/WTFString.h" | 43 #include "wtf/text/WTFString.h" |
| 44 | 44 |
| 45 namespace blink { | 45 namespace blink { |
| 46 | 46 |
| 47 class KURL; | 47 class KURL; |
| 48 class SharedBuffer; | 48 class SharedBuffer; |
| 49 class WebDragData; | |
| 49 | 50 |
| 50 // A data object for holding data that would be in a clipboard or moved | 51 // A data object for holding data that would be in a clipboard or moved |
| 51 // during a drag-n-drop operation. This is the data that WebCore is aware | 52 // during a drag-n-drop operation. This is the data that WebCore is aware |
| 52 // of and is not specific to a platform. | 53 // of and is not specific to a platform. |
| 53 class DataObject : public RefCountedWillBeGarbageCollectedFinalized<DataObject>, public WillBeHeapSupplementable<DataObject> { | 54 class DataObject : public RefCountedWillBeGarbageCollectedFinalized<DataObject>, public WillBeHeapSupplementable<DataObject> { |
| 54 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(DataObject); | 55 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(DataObject); |
| 55 public: | 56 public: |
| 56 static PassRefPtrWillBeRawPtr<DataObject> createFromPasteboard(PasteMode); | 57 static PassRefPtrWillBeRawPtr<DataObject> createFromPasteboard(PasteMode); |
| 57 static PassRefPtrWillBeRawPtr<DataObject> create(); | 58 static PassRefPtrWillBeRawPtr<DataObject> create(); |
| 58 | 59 |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 90 const String& filesystemId() const { ASSERT(!m_filesystemId.isEmpty()); retu rn m_filesystemId; } | 91 const String& filesystemId() const { ASSERT(!m_filesystemId.isEmpty()); retu rn m_filesystemId; } |
| 91 | 92 |
| 92 // Used to handle files (images) being dragged out. | 93 // Used to handle files (images) being dragged out. |
| 93 void addSharedBuffer(const String& name, PassRefPtr<SharedBuffer>); | 94 void addSharedBuffer(const String& name, PassRefPtr<SharedBuffer>); |
| 94 | 95 |
| 95 int modifierKeyState() const { return m_modifierKeyState; } | 96 int modifierKeyState() const { return m_modifierKeyState; } |
| 96 void setModifierKeyState(int modifierKeyState) { m_modifierKeyState = modifi erKeyState; } | 97 void setModifierKeyState(int modifierKeyState) { m_modifierKeyState = modifi erKeyState; } |
| 97 | 98 |
| 98 DECLARE_TRACE(); | 99 DECLARE_TRACE(); |
| 99 | 100 |
| 101 static PassRefPtrWillBeRawPtr<DataObject> createFromWebDragData(WebDragData) ; | |
|
tkent
2015/02/23 23:40:40
We can call this |create|.
tasak
2015/02/25 08:15:24
Done.
| |
| 102 WebDragData toWebDragData(); | |
| 103 | |
| 100 private: | 104 private: |
| 101 DataObject(); | 105 DataObject(); |
| 102 | 106 |
| 103 PassRefPtrWillBeRawPtr<DataObjectItem> findStringItem(const String& type) co nst; | 107 PassRefPtrWillBeRawPtr<DataObjectItem> findStringItem(const String& type) co nst; |
| 104 bool internalAddStringItem(PassRefPtrWillBeRawPtr<DataObjectItem>); | 108 bool internalAddStringItem(PassRefPtrWillBeRawPtr<DataObjectItem>); |
| 105 void internalAddFileItem(PassRefPtrWillBeRawPtr<DataObjectItem>); | 109 void internalAddFileItem(PassRefPtrWillBeRawPtr<DataObjectItem>); |
| 106 | 110 |
| 107 WillBeHeapVector<RefPtrWillBeMember<DataObjectItem> > m_itemList; | 111 WillBeHeapVector<RefPtrWillBeMember<DataObjectItem> > m_itemList; |
| 108 | 112 |
| 109 // State of Shift/Ctrl/Alt/Meta keys. | 113 // State of Shift/Ctrl/Alt/Meta keys. |
| 110 int m_modifierKeyState; | 114 int m_modifierKeyState; |
| 111 String m_filesystemId; | 115 String m_filesystemId; |
| 112 }; | 116 }; |
| 113 | 117 |
| 114 } // namespace blink | 118 } // namespace blink |
| 115 | 119 |
| 116 #endif | 120 #endif |
| OLD | NEW |