| 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
|
| @@ -217,6 +214,8 @@
|
| }
|
|
|
| ToolbarView::~ToolbarView() {
|
| + GetWidget()->RemoveObserver(this);
|
| +
|
| // NOTE: Don't remove the command observers here. This object gets destroyed
|
| // after the Browser (which owns the CommandUpdater), so the CommandUpdater is
|
| // already gone.
|
| @@ -227,6 +226,8 @@
|
|
|
| void ToolbarView::Init(views::View* location_bar_parent,
|
| views::View* popup_parent_view) {
|
| + GetWidget()->AddObserver(this);
|
| +
|
| back_ = new views::ButtonDropDown(this, new BackForwardMenuModel(
|
| browser_, BackForwardMenuModel::BACKWARD_MENU));
|
| back_->set_triggerable_event_flags(ui::EF_LEFT_MOUSE_BUTTON |
|
| @@ -313,9 +314,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 +324,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 +587,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:
|
|
|
|
|