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

Side by Side Diff: trunk/Source/core/clipboard/DataObject.h

Issue 211853002: Revert 169711 "Prevent web content from forging File entries in ..." (Closed) Base URL: svn://svn.chromium.org/blink/
Patch Set: Created 6 years, 8 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | trunk/Source/core/page/DragController.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 bool containsFilenames() const; 85 bool containsFilenames() const;
86 Vector<String> filenames() const; 86 Vector<String> filenames() const;
87 void addFilename(const String& filename, const String& displayName); 87 void addFilename(const String& filename, const String& displayName);
88 88
89 // Used to handle files (images) being dragged out. 89 // Used to handle files (images) being dragged out.
90 void addSharedBuffer(const String& name, PassRefPtr<SharedBuffer>); 90 void addSharedBuffer(const String& name, PassRefPtr<SharedBuffer>);
91 91
92 int modifierKeyState() const { return m_modifierKeyState; } 92 int modifierKeyState() const { return m_modifierKeyState; }
93 void setModifierKeyState(int modifierKeyState) { m_modifierKeyState = modifi erKeyState; } 93 void setModifierKeyState(int modifierKeyState) { m_modifierKeyState = modifi erKeyState; }
94 94
95 // The accessor should only ever be called by DragData.
96 const String& filenameForNavigation() const { return m_filenameForNavigation ; }
97 void setFilenameForNavigation(const String& filename) { m_filenameForNavigat ion = filename; }
98
99 void trace(Visitor*); 95 void trace(Visitor*);
100 96
101 private: 97 private:
102 DataObject(); 98 DataObject();
103 explicit DataObject(const DataObject&); 99 explicit DataObject(const DataObject&);
104 100
105 PassRefPtrWillBeRawPtr<DataObjectItem> findStringItem(const String& type) co nst; 101 PassRefPtrWillBeRawPtr<DataObjectItem> findStringItem(const String& type) co nst;
106 bool internalAddStringItem(PassRefPtrWillBeRawPtr<DataObjectItem>); 102 bool internalAddStringItem(PassRefPtrWillBeRawPtr<DataObjectItem>);
107 void internalAddFileItem(PassRefPtrWillBeRawPtr<DataObjectItem>); 103 void internalAddFileItem(PassRefPtrWillBeRawPtr<DataObjectItem>);
108 104
109 WillBeHeapVector<RefPtrWillBeMember<DataObjectItem> > m_itemList; 105 WillBeHeapVector<RefPtrWillBeMember<DataObjectItem> > m_itemList;
110 106
111 String m_filenameForNavigation;
112
113 // State of Shift/Ctrl/Alt/Meta keys. 107 // State of Shift/Ctrl/Alt/Meta keys.
114 int m_modifierKeyState; 108 int m_modifierKeyState;
115 }; 109 };
116 110
117 } // namespace WebCore 111 } // namespace WebCore
118 112
119 #endif 113 #endif
OLDNEW
« no previous file with comments | « no previous file | trunk/Source/core/page/DragController.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698