| Index: chrome/browser/ui/views/omnibox/omnibox_view_views.cc
|
| diff --git a/chrome/browser/ui/views/omnibox/omnibox_view_views.cc b/chrome/browser/ui/views/omnibox/omnibox_view_views.cc
|
| index 94a93c12ce9687e8fb8519dc54b6f1b606317b60..091b9f7e88df1c29d821bfebedafb498596d9198 100644
|
| --- a/chrome/browser/ui/views/omnibox/omnibox_view_views.cc
|
| +++ b/chrome/browser/ui/views/omnibox/omnibox_view_views.cc
|
| @@ -779,6 +779,27 @@ void OmniboxViewViews::OnWriteDragData(ui::OSExchangeData* data) {
|
| data->SetURL(url, selected_text);
|
| }
|
|
|
| +void OmniboxViewViews::AppendDropFormats(
|
| + int* formats,
|
| + std::set<ui::OSExchangeData::CustomFormat>* custom_formats) {
|
| + *formats = *formats | ui::OSExchangeData::URL;
|
| +}
|
| +
|
| +int OmniboxViewViews::OnDrop(const ui::OSExchangeData& data) {
|
| + if (data.HasURL()) {
|
| + GURL url;
|
| + string16 title;
|
| + if (data.GetURLAndTitle(&url, &title)) {
|
| + string16 text(StripJavascriptSchemas(UTF8ToUTF16(url.spec())));
|
| + if (model()->CanPasteAndGo(text)) {
|
| + model()->PasteAndGo(text);
|
| + return ui::DragDropTypes::DRAG_COPY;
|
| + }
|
| + }
|
| + }
|
| + return ui::DragDropTypes::DRAG_NONE;
|
| +}
|
| +
|
| void OmniboxViewViews::UpdateContextMenu(ui::SimpleMenuModel* menu_contents) {
|
| // Minor note: We use IDC_ for command id here while the underlying textfield
|
| // is using IDS_ for all its command ids. This is because views cannot depend
|
|
|