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

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

Issue 2014733003: Removing parsing of text from pasteboard. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: moving url parsing up the hierarchy Created 4 years, 7 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
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 5c237587c16216f35ba33894f1e69bb463c3d43f..4f658f5d77eb766c0206f873530ea1cb41396d92 100644
--- a/ui/base/dragdrop/os_exchange_data.h
+++ b/ui/base/dragdrop/os_exchange_data.h
@@ -70,6 +70,13 @@ class UI_BASE_EXPORT OSExchangeData {
// getting a URL.
enum FilenameToURLPolicy { CONVERT_FILENAMES, DO_NOT_CONVERT_FILENAMES, };
+ // Controls whether or not to attempt to parse dragged text as URL when
+ // getting a URL.
+ enum URLTextParsePolicy {
+ PARSE_TEXT_AS_URL,
+ DO_NOT_PARSE_TEXT_AS_URL,
+ };
+
// Encapsulates the info about a file to be downloaded.
struct UI_BASE_EXPORT DownloadFileInfo {
DownloadFileInfo(const base::FilePath& filename,
@@ -187,7 +194,8 @@ class UI_BASE_EXPORT OSExchangeData {
// GetString() returns the plain text representation of the pasteboard
// contents.
bool GetString(base::string16* data) const;
- bool GetURLAndTitle(FilenameToURLPolicy policy,
+ bool GetURLAndTitle(FilenameToURLPolicy filename_policy,
+ URLTextParsePolicy text_parse_policy,
GURL* url,
base::string16* title) const;
// Return the path of a file, if available.
@@ -199,7 +207,8 @@ class UI_BASE_EXPORT OSExchangeData {
// Test whether or not data of certain types is present, without actually
// returning anything.
bool HasString() const;
- bool HasURL(FilenameToURLPolicy policy) const;
+ bool HasURL(FilenameToURLPolicy filename_policy,
+ URLTextParsePolicy text_parse_policy) const;
bool HasFile() const;
bool HasCustomFormat(const Clipboard::FormatType& format) const;

Powered by Google App Engine
This is Rietveld 408576698