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

Unified Diff: chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.mm

Issue 10824307: Port Extension Commands to Mac. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 4 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/ui/cocoa/location_bar/location_bar_view_mac.mm
===================================================================
--- chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.mm (revision 151684)
+++ chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.mm (working copy)
@@ -398,15 +398,24 @@
decoration->UpdateVisibility(contents, GURL(toolbar_model_->GetText()));
}
+NSRect LocationBarViewMac::GetPageActionFrame(ExtensionAction* page_action) {
+ PageActionDecoration* decoration = GetPageActionDecoration(page_action);
+ if (!decoration)
+ return NSZeroRect;
+
+ AutocompleteTextFieldCell* cell = [field_ cell];
+ NSRect frame = [cell frameForDecoration:decoration inFrame:[field_ bounds]];
+ DCHECK(!NSIsEmptyRect(frame));
+ return frame;
+}
+
NSPoint LocationBarViewMac::GetPageActionBubblePoint(
ExtensionAction* page_action) {
PageActionDecoration* decoration = GetPageActionDecoration(page_action);
if (!decoration)
return NSZeroPoint;
- AutocompleteTextFieldCell* cell = [field_ cell];
- NSRect frame = [cell frameForDecoration:decoration inFrame:[field_ bounds]];
- DCHECK(!NSIsEmptyRect(frame));
+ NSRect frame = GetPageActionFrame(page_action);
if (NSIsEmptyRect(frame))
return NSZeroPoint;

Powered by Google App Engine
This is Rietveld 408576698