Cool to see this, swizzlers. ======================================================================== http://mondrian.corp.google.com/file/8931781///depot/googleclient/gears/opensource/gears/desktop/drop_target_base.h?a=1 File //depot/googleclient/gears/opensource/gears/desktop/drop_target_base.h (snapshot 1) ------------------------------------ Line 33: (BROWSER_WEBKIT && defined(OS_MACOSX)) On Tue Nov 11 15:14:37 2008 PST, nigeltao wrote: > On Tue Nov 11 09:14:29 2008 PST, playmobil wrote: > > BROWSER_WEBKIT is enough here, you don't need the &&. > > Does Chromium not define BROWSER_WEBKIT?
BROWSER_SAFARI? ======================================================================== http://mondrian.corp.google.com/file/8931781///depot/googleclient/gears/opensource/gears/desktop/drop_target_sf.cc?a=3 File //depot/googleclient/gears/opensource/gears/desktop/drop_target_sf.cc (snapshot 3) ------------------------------------ Line 46: DropTarget *callback_data); A more general event listener class might result if the class knew less about "DropTarget"'s. Would a void *callback_data work here? ------------------------------------ Line 90: PreventDefaultEventBehavior(event.get()); Because we've installed drag/drop listeners on the element, any TEXT and URL drag/drag events on that element will also flow through this listener code. I don't think we should PreventDefaultEventBehavior() or SetReturnValue() on those events; we should only respond to FILE drag/drop events. Know you're trying to get this going, so I'm happy with a TODO() to move the PreventDefaultEventBehavior() etc into the DropTarget callback code. ------------------------------------ Line 241: after reading the comment @247 about removeEventListener and blocking the listener callbacks, I wondered would make sense to add an else case here (no callback) and call (*listener)->SetCallback(NULL, NULL); to block the callbacks? ======================================================================== http://mondrian.corp.google.com/file/8931781///depot/googleclient/gears/opensource/gears/desktop/drop_target_sf.h?a=3 File //depot/googleclient/gears/opensource/gears/desktop/drop_target_sf.h (snapshot 3) ------------------------------------ Line 63: }; perhaps not use the DND abbreviation? How about HTML_EVENT_TYPE_DRAG_ENTER, etc, since we do hope to eventually add HTML_EVENT_TYPE_PASTE support. ======================================================================== -- To respond, reply to this email or visit http://mondrian.corp.google.com/8931781
