Index: chrome/browser/extensions/extension_infobar_delegate.cc |
=================================================================== |
--- chrome/browser/extensions/extension_infobar_delegate.cc (revision 96544) |
+++ chrome/browser/extensions/extension_infobar_delegate.cc (working copy) |
@@ -7,6 +7,7 @@ |
#include "chrome/browser/extensions/extension_host.h" |
#include "chrome/browser/extensions/extension_process_manager.h" |
#include "chrome/browser/profiles/profile.h" |
+#include "chrome/browser/tab_contents/infobar.h" |
#include "chrome/browser/ui/browser.h" |
#include "chrome/common/chrome_notification_types.h" |
#include "chrome/common/extensions/extension.h" |
@@ -16,7 +17,8 @@ |
ExtensionInfoBarDelegate::ExtensionInfoBarDelegate(Browser* browser, |
TabContents* tab_contents, |
const Extension* extension, |
- const GURL& url) |
+ const GURL& url, |
+ int height) |
: InfoBarDelegate(tab_contents), |
observer_(NULL), |
extension_(extension), |
@@ -30,6 +32,11 @@ |
Source<Profile>(browser->profile())); |
registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_UNLOADED, |
Source<Profile>(browser->profile())); |
+ |
+ height_ = std::max(0, height); |
+ height_ = std::min(2 * InfoBar::kDefaultBarTargetHeight, height_); |
+ if (height_ == 0) |
+ height_ = InfoBar::kDefaultBarTargetHeight; |
} |
ExtensionInfoBarDelegate::~ExtensionInfoBarDelegate() { |