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

Unified Diff: chrome/browser/ui/views/toolbar_view.h

Issue 11742003: Implemented drop hander for the Home toolbar button that accepts (only) links (Closed) Base URL: https://src.chromium.org/chrome/trunk/src/
Patch Set: Created 7 years, 11 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: chrome/browser/ui/views/toolbar_view.h
===================================================================
--- chrome/browser/ui/views/toolbar_view.h (revision 175785)
+++ chrome/browser/ui/views/toolbar_view.h (working copy)
@@ -31,6 +31,22 @@
class MenuListener;
}
+class HomeImageButton : public views::ImageButton {
Peter Kasting 2013/01/17 23:48:42 Nit: We should declare this in its own header, lik
Tom Cassiotis 2013/01/18 15:18:49 Done.
+ public:
+ HomeImageButton(views::ButtonListener* listener, Browser* browser);
+ virtual ~HomeImageButton();
+
+ virtual bool GetDropFormats(
+ int* formats,
+ std::set<OSExchangeData::CustomFormat>* custom_formats) OVERRIDE;
+ virtual bool CanDrop(const OSExchangeData& data) OVERRIDE;
+ virtual int OnDragUpdated(const ui::DropTargetEvent& event) OVERRIDE;
+ virtual int OnPerformDrop(const ui::DropTargetEvent& event) OVERRIDE;
+
+ private:
+ Browser* browser_;
+};
+
// The Browser Window's toolbar.
class ToolbarView : public views::AccessiblePaneView,
public views::MenuButtonListener,
@@ -201,7 +217,7 @@
views::ImageButton* back_;
views::ImageButton* forward_;
ReloadButton* reload_;
- views::ImageButton* home_;
+ HomeImageButton* home_;
LocationBarView* location_bar_;
BrowserActionsContainer* browser_actions_;
views::MenuButton* app_menu_;

Powered by Google App Engine
This is Rietveld 408576698