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

Unified Diff: chrome/browser/ui/views/toolbar_view.cc

Issue 11232060: Make sure sideload wipeout doesn't interfere with the tests. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 2 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/views/toolbar_view.h ('k') | chrome/common/extensions/feature_switch.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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:
« no previous file with comments | « chrome/browser/ui/views/toolbar_view.h ('k') | chrome/common/extensions/feature_switch.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698