Commit aff37c62 authored by Caroline Rising's avatar Caroline Rising Committed by Commit Bot

Remove button highlighting for promo bubbles.

Highlighting was previously added to buttons with anchored widgets. This is not the desired effect for promo buttons. This change makes the highlighted function overridable and removes the button highlight for the feature promo bubbles.

Bug: 888462
Change-Id: I79077bf9e7f30543eee6ae87db0785e9a0e08051
Reviewed-on: https://chromium-review.googlesource.com/1246144
Commit-Queue: Caroline Rising <corising@chromium.org>
Reviewed-by: default avatarTrent Apted <tapted@chromium.org>
Cr-Commit-Position: refs/heads/master@{#595164}
parent 6ebd25dd
......@@ -64,6 +64,9 @@ class FeaturePromoBubbleView : public views::BubbleDialogDelegateView {
void OnMouseEntered(const ui::MouseEvent& event) override;
void OnMouseExited(const ui::MouseEvent& event) override;
gfx::Rect GetBubbleBounds() override;
void UpdateHighlightedButton(bool highlighted) override {
// Do nothing: the anchor for promo bubbles should not highlight.
}
// Starts a timer to close the promo bubble.
void StartAutoCloseTimer(base::TimeDelta auto_close_duration);
......
......@@ -186,8 +186,9 @@ class VIEWS_EXPORT BubbleDialogDelegateView : public DialogDelegateView,
void UpdateAnchorWidgetRenderState(bool visible);
// Update the button highlight, which may be the anchor view or an explicit
// view set in |highlighted_button_tracker_|.
void UpdateHighlightedButton(bool highlighted);
// view set in |highlighted_button_tracker_|. This can be overridden to
// provide different highlight effects.
virtual void UpdateHighlightedButton(bool highlighted);
// A flag controlling bubble closure on deactivation.
bool close_on_deactivate_;
......
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