| Index: chrome/browser/ui/views/toolbar_view.cc
|
| ===================================================================
|
| --- chrome/browser/ui/views/toolbar_view.cc (revision 74816)
|
| +++ chrome/browser/ui/views/toolbar_view.cc (working copy)
|
| @@ -612,6 +612,34 @@
|
| canvas->FillRectInt(SK_ColorBLACK, 0, height() - 1, width(), 1);
|
| }
|
|
|
| +// Note this method is ignored on Windows, but needs to be implemented for
|
| +// linux, where it is called before CanDrop().
|
| +bool ToolbarView::GetDropFormats(
|
| + int* formats,
|
| + std::set<OSExchangeData::CustomFormat>* custom_formats) {
|
| + *formats = ui::OSExchangeData::URL | ui::OSExchangeData::STRING;
|
| + return true;
|
| +}
|
| +
|
| +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) {
|
| + if (event.source_operations() & ui::DragDropTypes::DRAG_COPY) {
|
| + return ui::DragDropTypes::DRAG_COPY;
|
| + } else if (event.source_operations() & ui::DragDropTypes::DRAG_LINK) {
|
| + return ui::DragDropTypes::DRAG_LINK;
|
| + }
|
| + return ui::DragDropTypes::DRAG_NONE;
|
| +}
|
| +
|
| +int ToolbarView::OnPerformDrop(const views::DropTargetEvent& event) {
|
| + return location_bar_->location_entry()->OnPerformDrop(event);
|
| +}
|
| +
|
| void ToolbarView::OnThemeChanged() {
|
| LoadImages();
|
| }
|
|
|