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

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

Issue 2322253004: Drag and dropping text, parsable as url (Closed)
Patch Set: Moving url logic out of os_exchange_data Created 4 years, 3 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/drag_and_drop_url_utils.h
diff --git a/ui/base/dragdrop/drag_and_drop_url_utils.h b/ui/base/dragdrop/drag_and_drop_url_utils.h
new file mode 100644
index 0000000000000000000000000000000000000000..049d27501eeaf9abd2dc4527e942042fd1161d03
--- /dev/null
+++ b/ui/base/dragdrop/drag_and_drop_url_utils.h
@@ -0,0 +1,28 @@
+// Copyright (c) 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef UI_BASE_DRAGDROP_DRAG_AND_DROP_URL_UTILS_H
+#define UI_BASE_DRAGDROP_DRAG_AND_DROP_URL_UTILS_H
+
+#include <utility>
+
+#include "base/optional.h"
+#include "base/strings/string16.h"
+#include "ui/base/dragdrop/os_exchange_data.h"
+#include "ui/base/ui_base_export.h"
+#include "url/gurl.h"
+
+namespace ui {
+
+bool UI_BASE_EXPORT
+CanBeInterpretedAsURL(const ui::OSExchangeData& data,
+ ui::OSExchangeData::FilenameToURLPolicy policy);
+
+// Returns url and title
+base::Optional<std::pair<GURL, base::string16>> UI_BASE_EXPORT
+TryToInterpretAsURL(const ui::OSExchangeData& data,
+ ui::OSExchangeData::FilenameToURLPolicy policy);
+} // namespace ui
+
+#endif // UI_BASE_DRAGDROP_DRAG_AND_DROP_URL_UTILS_H

Powered by Google App Engine
This is Rietveld 408576698