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

Unified Diff: chrome/browser/ui/views/extensions/extension_installed_bubble_view.cc

Issue 648553002: Use the BrowserActionsContainer for new extension bubbles in the toolbar redesign (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/extensions/extension_installed_bubble_view.cc
diff --git a/chrome/browser/ui/views/extensions/extension_installed_bubble_view.cc b/chrome/browser/ui/views/extensions/extension_installed_bubble_view.cc
index d54e9c844acaf8639af8089ac5c9e73534a90357..add120825783285d5dd7d4da901f26e449640662 100644
--- a/chrome/browser/ui/views/extensions/extension_installed_bubble_view.cc
+++ b/chrome/browser/ui/views/extensions/extension_installed_bubble_view.cc
@@ -33,6 +33,7 @@
#include "chrome/grit/chromium_strings.h"
#include "chrome/grit/generated_resources.h"
#include "extensions/common/extension.h"
+#include "extensions/common/feature_switch.h"
#include "ui/base/l10n/l10n_util.h"
#include "ui/base/resource/resource_bundle.h"
#include "ui/gfx/render_text.h"
@@ -529,7 +530,8 @@ bool ExtensionInstalledBubbleView::MaybeShowNow() {
BrowserView::GetBrowserViewForBrowser(bubble_.browser());
views::View* reference_view = NULL;
- if (bubble_.type() == bubble_.BROWSER_ACTION) {
+ if (bubble_.type() == bubble_.BROWSER_ACTION ||
+ extensions::FeatureSwitch::extension_action_redesign()->IsEnabled()) {
BrowserActionsContainer* container =
browser_view->GetToolbarView()->browser_actions();
if (container->animating())
@@ -595,7 +597,8 @@ gfx::Rect ExtensionInstalledBubbleView::GetAnchorRect() const {
}
void ExtensionInstalledBubbleView::WindowClosing() {
- if (bubble_.extension() && bubble_.type() == bubble_.PAGE_ACTION) {
+ if (bubble_.extension() && bubble_.type() == bubble_.PAGE_ACTION &&
+ !extensions::FeatureSwitch::extension_action_redesign()->IsEnabled()) {
BrowserView* browser_view =
BrowserView::GetBrowserViewForBrowser(bubble_.browser());
browser_view->GetLocationBarView()->SetPreviewEnabledPageAction(
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698