Skip to content

Commit

Permalink
[IME UI] Remove extension_action_redesign from IME bubble
Browse files Browse the repository at this point in the history
The extension_action_redesign feature is launched. Remove associated
code from ime_warning_bubble_view.cc.

BUG=590321

Review-Url: https://codereview.chromium.org/2909493002
Cr-Commit-Position: refs/heads/master@{#475679}
  • Loading branch information
rdcronin authored and Commit Bot committed May 30, 2017
1 parent 6af93d4 commit 6dfa5a1
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
11 changes: 5 additions & 6 deletions chrome/browser/ui/views/ime/ime_warning_bubble_view.cc
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
#include "chrome/browser/ui/views/toolbar/browser_actions_container.h"
#include "chrome/browser/ui/views/toolbar/toolbar_view.h"
#include "chrome/grit/generated_resources.h"
#include "extensions/common/feature_switch.h"
#include "ui/base/l10n/l10n_util.h"
#include "ui/base/resource/resource_bundle.h"
#include "ui/views/controls/button/checkbox.h"
Expand Down Expand Up @@ -96,7 +95,7 @@ ImeWarningBubbleView::ImeWarningBubbleView(
: extension_(extension),
browser_view_(browser_view),
browser_(browser_view->browser()),
anchor_to_browser_action_(false),
anchor_to_action_(false),
never_show_checkbox_(nullptr),
response_callback_(callback),
bubble_has_shown_(false),
Expand Down Expand Up @@ -135,10 +134,10 @@ ImeWarningBubbleView::~ImeWarningBubbleView() {
void ImeWarningBubbleView::InitAnchorView() {
views::View* reference_view = nullptr;

anchor_to_browser_action_ =
anchor_to_action_ =
extensions::ActionInfo::GetBrowserActionInfo(extension_) ||
extensions::FeatureSwitch::extension_action_redesign()->IsEnabled();
if (anchor_to_browser_action_) {
extensions::ActionInfo::GetPageActionInfo(extension_);
if (anchor_to_action_) {
// Anchors the bubble to the browser action of the extension.
reference_view = container_->GetViewForId(extension_->id());
}
Expand Down Expand Up @@ -193,5 +192,5 @@ void ImeWarningBubbleView::InitLayout() {
}

bool ImeWarningBubbleView::IsToolbarAnimating() {
return anchor_to_browser_action_ && container_->animating();
return anchor_to_action_ && container_->animating();
}
4 changes: 2 additions & 2 deletions chrome/browser/ui/views/ime/ime_warning_bubble_view.h
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,8 @@ class ImeWarningBubbleView : public views::BubbleDialogDelegateView,
// OnBrowserRemoved() is called.
Browser* browser_;

// True if bubble anchors to the browser action of the extension.
bool anchor_to_browser_action_;
// True if bubble anchors to the action of the extension.
bool anchor_to_action_;

// The check box on the bubble view.
views::Checkbox* never_show_checkbox_;
Expand Down

0 comments on commit 6dfa5a1

Please sign in to comment.