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

Unified Diff: chrome/browser/ui/cocoa/extensions/extension_installed_bubble_controller.mm

Issue 10872067: No more extension install infobars. (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
« no previous file with comments | « chrome/browser/ui/cocoa/extensions/extension_installed_bubble_bridge.mm ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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.
« no previous file with comments | « chrome/browser/ui/cocoa/extensions/extension_installed_bubble_bridge.mm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698