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

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

Issue 9460045: Add Mac interface for installing bundles of extensions. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 10 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/extensions/extension_installed_bubble_bridge.mm
diff --git a/chrome/browser/ui/cocoa/extensions/extension_installed_bubble_bridge.mm b/chrome/browser/ui/cocoa/extensions/extension_installed_bubble_bridge.mm
index 1639f73eaa30ad9138f10edb0a61f5ff9d6e1119..894643fce7de7fb1c9b7b6939128a1577a2c8dcf 100644
--- a/chrome/browser/ui/cocoa/extensions/extension_installed_bubble_bridge.mm
+++ b/chrome/browser/ui/cocoa/extensions/extension_installed_bubble_bridge.mm
@@ -6,6 +6,7 @@
#include "base/i18n/rtl.h"
#include "base/utf_string_conversions.h"
+#include "chrome/browser/extensions/bundle_installer.h"
#include "chrome/browser/infobars/infobar_tab_helper.h"
#include "chrome/browser/tab_contents/confirm_infobar_delegate.h"
#include "chrome/browser/tab_contents/simple_alert_infobar_delegate.h"
@@ -22,6 +23,8 @@
#include "ui/base/l10n/l10n_util.h"
#include "ui/gfx/image/image.h"
+using extensions::BundleInstaller;
+
// When an extension is installed on Mac with neither browser action nor
// page action icons, show an infobar instead of a popup bubble.
static void ShowGenericExtensionInstalledInfoBar(
@@ -64,6 +67,7 @@ void ShowExtensionInstalledBubble(
[[ExtensionInstalledBubbleController alloc]
initWithParentWindow:browser->window()->GetNativeHandle()
extension:extension
+ bundle:NULL
browser:browser
icon:icon];
} else {
@@ -75,3 +79,15 @@ void ShowExtensionInstalledBubble(
}
} // namespace browser
+
+void extensions::BundleInstaller::ShowInstalledBubble(
+ const BundleInstaller* bundle, Browser* browser) {
+ // The controller is deallocated when the window is closed, so no need to
+ // worry about it here.
+ [[ExtensionInstalledBubbleController alloc]
+ initWithParentWindow:browser->window()->GetNativeHandle()
+ extension:NULL
+ bundle:bundle
+ browser:browser
+ icon:SkBitmap()];
+}

Powered by Google App Engine
This is Rietveld 408576698