summaryrefslogtreecommitdiffstats
path: root/chrome/browser/cocoa/autocomplete_text_field_cell.mm
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/browser/cocoa/autocomplete_text_field_cell.mm')
-rw-r--r--chrome/browser/cocoa/autocomplete_text_field_cell.mm11
1 files changed, 11 insertions, 0 deletions
diff --git a/chrome/browser/cocoa/autocomplete_text_field_cell.mm b/chrome/browser/cocoa/autocomplete_text_field_cell.mm
index 3c29f8b..7c0c27f 100644
--- a/chrome/browser/cocoa/autocomplete_text_field_cell.mm
+++ b/chrome/browser/cocoa/autocomplete_text_field_cell.mm
@@ -367,6 +367,17 @@ void DrawImageInRect(NSImage* image, NSView* view, const NSRect& rect) {
return NSZeroRect;
}
+- (NSRect)pageActionFrameForExtensionAction:(ExtensionAction*)action
+ inFrame:(NSRect)cellFrame {
+ const size_t pageActionCount = [self pageActionCount];
+ size_t pos = 0;
+ while (pos < pageActionCount &&
+ action != page_action_views_->ViewAt(pos)->page_action())
+ ++pos;
+ return (pos == pageActionCount) ? NSZeroRect :
+ [self pageActionFrameForIndex:pos inFrame:cellFrame];
+}
+
- (void)drawHintWithFrame:(NSRect)cellFrame inView:(NSView*)controlView {
DCHECK(hintString_);