Index: chrome/browser/ui/cocoa/extensions/extension_installed_bubble_controller.mm |
diff --git a/chrome/browser/ui/cocoa/extensions/extension_installed_bubble_controller.mm b/chrome/browser/ui/cocoa/extensions/extension_installed_bubble_controller.mm |
index 4dedebd408106220bd88162b820e9f72ce095682..c73f368ad579536608518f91a907306d87790e45 100644 |
--- a/chrome/browser/ui/cocoa/extensions/extension_installed_bubble_controller.mm |
+++ b/chrome/browser/ui/cocoa/extensions/extension_installed_bubble_controller.mm |
@@ -113,7 +113,7 @@ class ExtensionLoadedNotificationObserver |
!extension->page_action()->default_icon_path().empty()) { |
type_ = extension_installed_bubble::kPageAction; |
} else { |
- NOTREACHED(); // kGeneric installs handled in extension_install_prompt. |
+ type_ = extension_installed_bubble::kGeneric; |
} |
if (type_ == extension_installed_bubble::kBundle) { |
@@ -207,16 +207,18 @@ class ExtensionLoadedNotificationObserver |
locationBarView->GetPageActionBubblePoint(extension_->page_action()); |
break; |
} |
- case extension_installed_bubble::kBundle: { |
+ case extension_installed_bubble::kBundle: |
+ case extension_installed_bubble::kGeneric: { |
+ // Point at the bottom of the wrench menu. |
NSView* wrenchButton = |
[[window->cocoa_controller() toolbarController] wrenchButton]; |
const NSRect bounds = [wrenchButton bounds]; |
- NSPoint anchor = NSMakePoint(NSMidX(bounds), NSMidY(bounds)); |
+ NSPoint anchor = NSMakePoint(NSMidX(bounds), NSMaxY(bounds)); |
arrowPoint = [wrenchButton convertPoint:anchor toView:nil]; |
break; |
} |
default: { |
- NOTREACHED() << "Generic extension type not allowed in install bubble."; |
+ NOTREACHED(); |
} |
} |
return arrowPoint; |
@@ -225,8 +227,6 @@ class ExtensionLoadedNotificationObserver |
// Override -[BaseBubbleController showWindow:] to tweak bubble location and |
// set up UI elements. |
- (void)showWindow:(id)sender { |
- // Generic extensions get an infobar rather than a bubble. |
- DCHECK(type_ != extension_installed_bubble::kGeneric); |
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
// Load nib and calculate height based on messages to be shown. |