Index: chrome/browser/ui/views/toolbar_view.cc |
=================================================================== |
--- chrome/browser/ui/views/toolbar_view.cc (revision 74430) |
+++ chrome/browser/ui/views/toolbar_view.cc (working copy) |
@@ -607,6 +607,20 @@ |
canvas->FillRectInt(SK_ColorBLACK, 0, height() - 1, width(), 1); |
} |
+bool ToolbarView::CanDrop(const ui::OSExchangeData& data) { |
+ // To support loading URLs by dropping into the toolbar, we need to support |
+ // dropping URLs and/or text. |
+ return data.HasURL() || data.HasString(); |
+} |
+ |
+int ToolbarView::OnDragUpdated(const views::DropTargetEvent& event) { |
+ return ui::DragDropTypes::DRAG_COPY; |
sky
2011/02/11 01:06:07
I think you should allow move or link too. But, yo
Roger Tawa OOO till Jul 10th
2011/02/11 15:20:17
Changed to support either copy or link, just like
sky
2011/02/11 17:14:53
Fair enough, but shouldn't we ignore the drop enti
Roger Tawa OOO till Jul 10th
2011/02/11 21:35:26
If the drop is on the edit itself, it uses its own
sky
2011/02/11 23:18:50
If you drag the url from the omnibox it won't allo
|
+} |
+ |
+int ToolbarView::OnPerformDrop(const views::DropTargetEvent& event) { |
+ return location_bar_->location_entry()->OnPerformDrop(event); |
+} |
+ |
void ToolbarView::OnThemeChanged() { |
LoadImages(); |
} |