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

Unified Diff: chrome/browser/cocoa/location_bar/location_bar_decoration.h

Issue 2870059: [Mac] Adjust omnibox decoration dragging to keep image under mouse. (Closed) Base URL: git://codf21.jail/chromium.git
Patch Set: Move method per Trung. Created 10 years, 5 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/cocoa/location_bar/location_bar_decoration.h
diff --git a/chrome/browser/cocoa/location_bar/location_bar_decoration.h b/chrome/browser/cocoa/location_bar/location_bar_decoration.h
index 51571cceae85d63e48a96e4c8d989e12708833d1..56a4b83bcf7afa895e06b246fba3ec2e19f0f825 100644
--- a/chrome/browser/cocoa/location_bar/location_bar_decoration.h
+++ b/chrome/browser/cocoa/location_bar/location_bar_decoration.h
@@ -59,6 +59,12 @@ class LocationBarDecoration {
// The image to drag.
virtual NSImage* GetDragImage() { return nil; }
+ // Return the place within the decoration's frame where the
+ // |GetDragImage()| comes from. This is used to make sure the image
+ // appears correctly under the mouse while dragging. |frame|
+ // matches the frame passed to |DrawInFrame()|.
+ virtual NSRect GetDragImageFrame(NSRect frame) { return NSZeroRect; }
+
// The pasteboard to drag.
virtual NSPasteboard* GetDragPasteboard() { return nil; }
« no previous file with comments | « chrome/browser/cocoa/location_bar/ev_bubble_decoration.h ('k') | chrome/browser/cocoa/location_bar/location_icon_decoration.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698