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

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

Issue 11189094: Implement sideload wipeout for Extensions. (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
Index: chrome/browser/ui/views/toolbar_view.cc
===================================================================
--- chrome/browser/ui/views/toolbar_view.cc (revision 162977)
+++ chrome/browser/ui/views/toolbar_view.cc (working copy)
@@ -32,6 +32,7 @@
#include "chrome/browser/ui/toolbar/wrench_menu_model.h"
#include "chrome/browser/ui/view_ids.h"
#include "chrome/browser/ui/views/browser_actions_container.h"
+#include "chrome/browser/ui/views/extensions/disabled_extensions_view.h"
#include "chrome/browser/ui/views/location_bar/location_bar_container.h"
#include "chrome/browser/ui/views/location_bar/page_action_image_view.h"
#include "chrome/browser/ui/views/wrench_menu.h"
@@ -110,6 +111,9 @@
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
@@ -294,9 +298,8 @@
app_menu_->set_id(VIEW_ID_APP_MENU);
// Add any necessary badges to the menu item based on the system state.
- if (ShouldShowUpgradeRecommended() || ShouldShowIncompatibilityWarning()) {
+ if (ShouldShowUpgradeRecommended() || ShouldShowIncompatibilityWarning())
UpdateAppMenuState();
- }
LoadImages();
// Always add children in order from left to right, for accessibility.
@@ -310,6 +313,10 @@
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();
// Accessibility specific tooltip text.
@@ -319,6 +326,11 @@
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) {
« no previous file with comments | « chrome/browser/ui/views/toolbar_view.h ('k') | chrome/browser/ui/webui/extensions/extension_settings_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698