diff options
author | thakis@chromium.org <thakis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-12-19 03:30:19 +0000 |
---|---|---|
committer | thakis@chromium.org <thakis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-12-19 03:30:19 +0000 |
commit | 0ec9512a65f8d7f15dbddd902363994660d85ffb (patch) | |
tree | a075476ee0051162b69ab79308080a1c8ca8c985 /chrome/browser/cocoa/autocomplete_text_field.mm | |
parent | 732169bb11fbca6eb6048e37f1d897880771115b (diff) | |
download | chromium_src-0ec9512a65f8d7f15dbddd902363994660d85ffb.zip chromium_src-0ec9512a65f8d7f15dbddd902363994660d85ffb.tar.gz chromium_src-0ec9512a65f8d7f15dbddd902363994660d85ffb.tar.bz2 |
Revert 34998, more stabbing in the dark to find a perf regression - Mac: implement DnD of URLs onto Omnibox.
(DnD of text coming in another patch.)
BUG=24631
TEST=Select a URL/link/file from somewhere (a link in a browser, a URL in text, a file from the desktop, etc.) and drag it to the Omnibox in a Chromium browser window; the contents of the Omnibox should be selected to indicate that a drop would replace its contents; dropping should navigate to the appropriate location.
Review URL: http://codereview.chromium.org/481012
TBR=viettrungluu@chromium.org
Review URL: http://codereview.chromium.org/501135
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@35038 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/cocoa/autocomplete_text_field.mm')
-rw-r--r-- | chrome/browser/cocoa/autocomplete_text_field.mm | 36 |
1 files changed, 0 insertions, 36 deletions
diff --git a/chrome/browser/cocoa/autocomplete_text_field.mm b/chrome/browser/cocoa/autocomplete_text_field.mm index cea5f15..a067fdc 100644 --- a/chrome/browser/cocoa/autocomplete_text_field.mm +++ b/chrome/browser/cocoa/autocomplete_text_field.mm @@ -6,9 +6,6 @@ #include "base/logging.h" #import "chrome/browser/cocoa/autocomplete_text_field_cell.h" -#import "chrome/browser/cocoa/browser_window_controller.h" -#import "chrome/browser/cocoa/toolbar_controller.h" -#import "chrome/browser/cocoa/url_drop_target.h" @implementation AutocompleteTextField @@ -25,7 +22,6 @@ - (void)awakeFromNib { DCHECK([[self cell] isKindOfClass:[AutocompleteTextFieldCell class]]); - dropHandler_.reset([[URLDropTargetHandler alloc] initWithView:self]); } - (void)flagsChanged:(NSEvent*)theEvent { @@ -256,36 +252,4 @@ } } -// (URLDropTarget protocol) -- (id<URLDropTargetController>)urlDropController { - BrowserWindowController* windowController = [[self window] windowController]; - DCHECK([windowController isKindOfClass:[BrowserWindowController class]]); - return [windowController toolbarController]; -} - -// (URLDropTarget protocol) -- (NSDragOperation)draggingEntered:(id<NSDraggingInfo>)sender { - // Make ourself the first responder, which will select the text to indicate - // that our contents would be replaced by a drop. - // TODO(viettrungluu): crbug.com/30809 -- this is a hack since it steals focus - // and doesn't return it. - [[self window] makeFirstResponder:self]; - return [dropHandler_ draggingEntered:sender]; -} - -// (URLDropTarget protocol) -- (NSDragOperation)draggingUpdated:(id<NSDraggingInfo>)sender { - return [dropHandler_ draggingUpdated:sender]; -} - -// (URLDropTarget protocol) -- (void)draggingExited:(id<NSDraggingInfo>)sender { - return [dropHandler_ draggingExited:sender]; -} - -// (URLDropTarget protocol) -- (BOOL)performDragOperation:(id<NSDraggingInfo>)sender { - return [dropHandler_ performDragOperation:sender]; -} - @end |