Commit 08704228 authored by rdevlin.cronin's avatar rdevlin.cronin Committed by Commit bot

Use the BrowserActionsContainer for new extension bubbles in the toolbar redesign

When using the extension toolbar redesign, we should use the
BrowserActionsContainer for any "new extension" bubbles, as
all extensions will have an icon there. Use this in lieu of
the location bar or a page action.

BUG=422117

Review URL: https://codereview.chromium.org/648553002

Cr-Commit-Position: refs/heads/master@{#299115}
parent 28b5396f
......@@ -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(
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment