Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(357)

Side by Side Diff: third_party/WebKit/Source/core/clipboard/DataObject.h

Issue 2674953003: Only generate suggested filenames when actually dragging an image. (Closed)
Patch Set: rebase Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 // Used for dragging in filesystem from the desktop. 96 // Used for dragging in filesystem from the desktop.
97 void setFilesystemId(const String& fileSystemId) { 97 void setFilesystemId(const String& fileSystemId) {
98 m_filesystemId = fileSystemId; 98 m_filesystemId = fileSystemId;
99 } 99 }
100 const String& filesystemId() const { 100 const String& filesystemId() const {
101 ASSERT(!m_filesystemId.isEmpty()); 101 ASSERT(!m_filesystemId.isEmpty());
102 return m_filesystemId; 102 return m_filesystemId;
103 } 103 }
104 104
105 // Used to handle files (images) being dragged out. 105 // Used to handle files (images) being dragged out.
106 void addSharedBuffer(const String& name, PassRefPtr<SharedBuffer>); 106 void addSharedBuffer(PassRefPtr<SharedBuffer>,
107 const KURL&,
108 const String& filenameExtension,
109 const AtomicString& contentDisposition);
107 110
108 int modifiers() const { return m_modifiers; } 111 int modifiers() const { return m_modifiers; }
109 void setModifiers(int modifiers) { m_modifiers = modifiers; } 112 void setModifiers(int modifiers) { m_modifiers = modifiers; }
110 113
111 DECLARE_TRACE(); 114 DECLARE_TRACE();
112 115
113 WebDragData toWebDragData(); 116 WebDragData toWebDragData();
114 117
115 private: 118 private:
116 DataObject(); 119 DataObject();
117 120
118 DataObjectItem* findStringItem(const String& type) const; 121 DataObjectItem* findStringItem(const String& type) const;
119 bool internalAddStringItem(DataObjectItem*); 122 bool internalAddStringItem(DataObjectItem*);
120 void internalAddFileItem(DataObjectItem*); 123 void internalAddFileItem(DataObjectItem*);
121 124
122 HeapVector<Member<DataObjectItem>> m_itemList; 125 HeapVector<Member<DataObjectItem>> m_itemList;
123 126
124 // State of Shift/Ctrl/Alt/Meta keys and Left/Right/Middle mouse buttons 127 // State of Shift/Ctrl/Alt/Meta keys and Left/Right/Middle mouse buttons
125 int m_modifiers; 128 int m_modifiers;
126 String m_filesystemId; 129 String m_filesystemId;
127 }; 130 };
128 131
129 } // namespace blink 132 } // namespace blink
130 133
131 #endif 134 #endif
OLDNEW
« no previous file with comments | « content/renderer/render_widget.cc ('k') | third_party/WebKit/Source/core/clipboard/DataObject.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698