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

Unified Diff: ui/views/controls/textfield/textfield_controller.h

Issue 11416327: Omnibox should accept and navigate URLs dropped using drag and drop. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: patch Created 8 years 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/views/controls/textfield/textfield_controller.h
diff --git a/ui/views/controls/textfield/textfield_controller.h b/ui/views/controls/textfield/textfield_controller.h
index c39f59cbf3e897322280507e1a98fd5677a2b322..973e3b2c875054cf54e1df32e2c5728d3d1bb417 100644
--- a/ui/views/controls/textfield/textfield_controller.h
+++ b/ui/views/controls/textfield/textfield_controller.h
@@ -5,12 +5,14 @@
#ifndef UI_VIEWS_CONTROLS_TEXTFIELD_TEXTFIELD_CONTROLLER_H_
#define UI_VIEWS_CONTROLS_TEXTFIELD_TEXTFIELD_CONTROLLER_H_
+#include <set>
+
#include "base/string16.h"
+#include "ui/base/dragdrop/os_exchange_data.h"
#include "ui/views/views_export.h"
namespace ui {
class KeyEvent;
-class OSExchangeData;
class SimpleMenuModel;
} // namespace ui
@@ -49,6 +51,17 @@ class VIEWS_EXPORT TextfieldController {
// chance to modify the drag data.
virtual void OnWriteDragData(ui::OSExchangeData* data) {}
+ // Enables the controller to append to the accepted drop formats.
+ virtual void AppendDropFormats(
+ int* formats,
+ std::set<ui::OSExchangeData::CustomFormat>* custom_formats) {}
+
+ // Called when a drop of dragged data happens on the textfield. This method is
+ // called before regular handling of the drop. If this returns a drag
+ // operation other than |ui::DragDropTypes::DRAG_NONE|, regular handling is
+ // skipped.
+ virtual int OnDrop(const ui::OSExchangeData& data);
+
// Gives the controller a chance to modify the context menu contents.
virtual void UpdateContextMenu(ui::SimpleMenuModel* menu_contents) {}

Powered by Google App Engine
This is Rietveld 408576698