summaryrefslogtreecommitdiffstats
path: root/chrome/browser/cocoa/autocomplete_text_field.mm
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/browser/cocoa/autocomplete_text_field.mm')
-rw-r--r--chrome/browser/cocoa/autocomplete_text_field.mm26
1 files changed, 8 insertions, 18 deletions
diff --git a/chrome/browser/cocoa/autocomplete_text_field.mm b/chrome/browser/cocoa/autocomplete_text_field.mm
index 49b0d80..60d3507 100644
--- a/chrome/browser/cocoa/autocomplete_text_field.mm
+++ b/chrome/browser/cocoa/autocomplete_text_field.mm
@@ -124,10 +124,14 @@
return;
}
- // Give the cell a chance to intercept clicks in page-actions and
- // other decorative items.
- if ([cell mouseDown:theEvent inRect:bounds ofView:self]) {
- return;
+ // If the user clicked on one of the icons (security icon, Page
+ // Actions, etc), let the icon handle the click.
+ for (AutocompleteTextFieldIcon* icon in [cell layedOutIcons:bounds]) {
+ const NSRect iconRect = [icon rect];
+ if (NSMouseInRect(location, iconRect, flipped)) {
+ [icon view]->OnMousePressed(iconRect);
+ return;
+ }
}
NSText* editor = [self currentEditor];
@@ -204,11 +208,6 @@
[self addCursorRect:[icon rect] cursor:[NSCursor arrowCursor]];
}
-// TODO(shess): -resetFieldEditorFrameIfNeeded is the place where
-// changes to the cell layout should be flushed. LocationBarViewMac
-// and ToolbarController are calling this routine directly, and I
-// think they are probably wrong.
-// http://crbug.com/40053
- (void)updateCursorAndToolTipRects {
// This will force |resetCursorRects| to be called, as it is not to be called
// directly.
@@ -372,13 +371,4 @@
actionMenuForEvent:event inRect:[self bounds] ofView:self];
}
-- (NSRect)starIconFrame {
- AutocompleteTextFieldCell* cell = [self autocompleteTextFieldCell];
- return [cell starIconFrameForFrame:[self bounds]];
-}
-
-- (NSPasteboard*)locationDragPasteboard {
- return [[self autocompleteTextFieldCell] locationDragPasteboard];
-}
-
@end