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

Unified Diff: ui/base/dragdrop/os_exchange_data.h

Issue 135633002: Don't populate URL data in WebDropData when dragging files. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix Blink style enums Created 6 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/browser/web_contents/web_contents_view_aura.cc ('k') | ui/base/dragdrop/os_exchange_data.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/base/dragdrop/os_exchange_data.h
diff --git a/ui/base/dragdrop/os_exchange_data.h b/ui/base/dragdrop/os_exchange_data.h
index f62a0d1a68532a8f76dda0402e9eb55dce5d6e4c..7a968fafe521198923cb25427b57ce732d56acd2 100644
--- a/ui/base/dragdrop/os_exchange_data.h
+++ b/ui/base/dragdrop/os_exchange_data.h
@@ -68,6 +68,10 @@ class UI_BASE_EXPORT OSExchangeData {
#endif
};
+ // Controls whether or not filenames should be converted to file: URLs when
+ // getting a URL.
+ enum FilenameToURLPolicy { CONVERT_FILENAMES, DO_NOT_CONVERT_FILENAMES, };
+
// Encapsulates the info about a file to be downloaded.
struct UI_BASE_EXPORT DownloadFileInfo {
DownloadFileInfo(const base::FilePath& filename,
@@ -107,7 +111,9 @@ class UI_BASE_EXPORT OSExchangeData {
const Pickle& data) = 0;
virtual bool GetString(base::string16* data) const = 0;
- virtual bool GetURLAndTitle(GURL* url, base::string16* title) const = 0;
+ virtual bool GetURLAndTitle(FilenameToURLPolicy policy,
+ GURL* url,
+ base::string16* title) const = 0;
virtual bool GetFilename(base::FilePath* path) const = 0;
virtual bool GetFilenames(
std::vector<FileInfo>* file_names) const = 0;
@@ -183,7 +189,9 @@ class UI_BASE_EXPORT OSExchangeData {
// not exist, the out parameter is not touched. The out parameter cannot be
// NULL.
bool GetString(base::string16* data) const;
- bool GetURLAndTitle(GURL* url, base::string16* title) const;
+ bool GetURLAndTitle(FilenameToURLPolicy policy,
+ GURL* url,
+ base::string16* title) const;
// Return the path of a file, if available.
bool GetFilename(base::FilePath* path) const;
bool GetFilenames(
« no previous file with comments | « content/browser/web_contents/web_contents_view_aura.cc ('k') | ui/base/dragdrop/os_exchange_data.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698