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

Side by Side Diff: ui/base/dragdrop/os_exchange_data_provider_win.h

Issue 207013003: Mark drags starting in web content as tainted to avoid file path forgery (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Cleanup Created 6 years, 9 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef UI_BASE_DRAGDROP_OS_EXCHANGE_DATA_PROVIDER_WIN_H_ 5 #ifndef UI_BASE_DRAGDROP_OS_EXCHANGE_DATA_PROVIDER_WIN_H_
6 #define UI_BASE_DRAGDROP_OS_EXCHANGE_DATA_PROVIDER_WIN_H_ 6 #define UI_BASE_DRAGDROP_OS_EXCHANGE_DATA_PROVIDER_WIN_H_
7 7
8 #include <objidl.h> 8 #include <objidl.h>
9 #include <shlobj.h> 9 #include <shlobj.h>
10 #include <string> 10 #include <string>
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
142 explicit OSExchangeDataProviderWin(IDataObject* source); 142 explicit OSExchangeDataProviderWin(IDataObject* source);
143 OSExchangeDataProviderWin(); 143 OSExchangeDataProviderWin();
144 144
145 virtual ~OSExchangeDataProviderWin(); 145 virtual ~OSExchangeDataProviderWin();
146 146
147 IDataObject* data_object() const { return data_.get(); } 147 IDataObject* data_object() const { return data_.get(); }
148 IDataObjectAsyncCapability* async_operation() const { return data_.get(); } 148 IDataObjectAsyncCapability* async_operation() const { return data_.get(); }
149 149
150 // OSExchangeData::Provider methods. 150 // OSExchangeData::Provider methods.
151 virtual Provider* Clone() const; 151 virtual Provider* Clone() const;
152 virtual void MarkOriginatedFromRenderer();
153 virtual bool DidOriginateFromRenderer() const;
152 virtual void SetString(const base::string16& data); 154 virtual void SetString(const base::string16& data);
153 virtual void SetURL(const GURL& url, const base::string16& title); 155 virtual void SetURL(const GURL& url, const base::string16& title);
154 virtual void SetFilename(const base::FilePath& path); 156 virtual void SetFilename(const base::FilePath& path);
155 virtual void SetFilenames( 157 virtual void SetFilenames(
156 const std::vector<OSExchangeData::FileInfo>& filenames); 158 const std::vector<OSExchangeData::FileInfo>& filenames);
157 virtual void SetPickledData(const OSExchangeData::CustomFormat& format, 159 virtual void SetPickledData(const OSExchangeData::CustomFormat& format,
158 const Pickle& data); 160 const Pickle& data);
159 virtual void SetFileContents(const base::FilePath& filename, 161 virtual void SetFileContents(const base::FilePath& filename,
160 const std::string& file_contents); 162 const std::string& file_contents);
161 virtual void SetHtml(const base::string16& html, const GURL& base_url); 163 virtual void SetHtml(const base::string16& html, const GURL& base_url);
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
198 gfx::ImageSkia drag_image_; 200 gfx::ImageSkia drag_image_;
199 gfx::Vector2d drag_image_offset_; 201 gfx::Vector2d drag_image_offset_;
200 #endif 202 #endif
201 203
202 DISALLOW_COPY_AND_ASSIGN(OSExchangeDataProviderWin); 204 DISALLOW_COPY_AND_ASSIGN(OSExchangeDataProviderWin);
203 }; 205 };
204 206
205 } // namespace ui 207 } // namespace ui
206 208
207 #endif // UI_BASE_DRAGDROP_OS_EXCHANGE_DATA_PROVIDER_WIN_H_ 209 #endif // UI_BASE_DRAGDROP_OS_EXCHANGE_DATA_PROVIDER_WIN_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698