Index: chrome/browser/ui/views/toolbar_view.cc |
=================================================================== |
--- chrome/browser/ui/views/toolbar_view.cc (revision 163351) |
+++ chrome/browser/ui/views/toolbar_view.cc (working copy) |
@@ -111,9 +111,6 @@ |
const int kSearchTopLocationBarSpacing = 2; |
const int kSearchToolbarSpacing = 5; |
-// How often to show the disabled extension (sideload wipeout) bubble. |
-const int kShowSideloadWipeoutBubbleMax = 3; |
- |
gfx::ImageSkia* kPopupBackgroundEdge = NULL; |
// The omnibox border has some additional shadow, so we use less vertical |
@@ -227,6 +224,8 @@ |
void ToolbarView::Init(views::View* location_bar_parent, |
views::View* popup_parent_view) { |
+ GetWidget()->AddObserver(this); |
sky
2012/10/23 19:46:14
I get nervous when there is an add with no corresp
sky
2012/10/23 19:46:59
Sorry, this comment is a bit vague. I specifically
|
+ |
back_ = new views::ButtonDropDown(this, new BackForwardMenuModel( |
browser_, BackForwardMenuModel::BACKWARD_MENU)); |
back_->set_triggerable_event_flags(ui::EF_LEFT_MOUSE_BUTTON | |
@@ -313,9 +312,6 @@ |
location_bar_->Init(popup_parent_view); |
show_home_button_.Init(prefs::kShowHomeButton, |
browser_->profile()->GetPrefs(), this); |
- sideload_wipeout_bubble_shown_.Init( |
- prefs::kExtensionsSideloadWipeoutBubbleShown, |
- browser_->profile()->GetPrefs(), NULL); |
browser_actions_->Init(); |
@@ -326,11 +322,6 @@ |
forward_->SetTooltipText( |
l10n_util::GetStringUTF16(IDS_ACCNAME_TOOLTIP_FORWARD)); |
} |
- |
- int bubble_shown_count = sideload_wipeout_bubble_shown_.GetValue(); |
- if (bubble_shown_count < kShowSideloadWipeoutBubbleMax && |
- DisabledExtensionsView::MaybeShow(browser_, app_menu_)) |
- sideload_wipeout_bubble_shown_.SetValue(++bubble_shown_count); |
} |
void ToolbarView::Update(WebContents* tab, bool should_restore_state) { |
@@ -594,6 +585,12 @@ |
chrome::ExecuteCommandWithDisposition(browser_, command, disposition); |
} |
+void ToolbarView::OnWidgetVisibilityChanged(views::Widget* widget, |
+ bool visible) { |
+ if (visible) |
+ DisabledExtensionsView::MaybeShow(browser_, app_menu_); |
+} |
+ |
//////////////////////////////////////////////////////////////////////////////// |
// ToolbarView, content::NotificationObserver implementation: |