Commit 98748ed1 authored by Tina Wang's avatar Tina Wang Committed by Commit Bot

[SendTabToSelf] Onibox icon will keep highlighted after the bubble closed

Changed the way to get SendTabToSelfIconView to make sure that
BubbleDialogDelegateView::SetHighlightedButton() Will been called.

Deleted redundant variable and getter.

Bug: 978520
Change-Id: I70ed6ff878b7e1b2583659bca147cb5452dc307a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1728057Reviewed-by: default avatarAvi Drissman <avi@chromium.org>
Commit-Queue: Tina Wang <tinazwang@chromium.org>
Cr-Commit-Position: refs/heads/master@{#683317}
parent 5c04085c
...@@ -1423,12 +1423,15 @@ send_tab_to_self::SendTabToSelfBubbleView* BrowserView::ShowSendTabToSelfBubble( ...@@ -1423,12 +1423,15 @@ send_tab_to_self::SendTabToSelfBubbleView* BrowserView::ShowSendTabToSelfBubble(
send_tab_to_self::SendTabToSelfBubbleViewImpl* bubble = send_tab_to_self::SendTabToSelfBubbleViewImpl* bubble =
new send_tab_to_self::SendTabToSelfBubbleViewImpl( new send_tab_to_self::SendTabToSelfBubbleViewImpl(
GetLocationBarView(), gfx::Point(), web_contents, controller); GetLocationBarView(), gfx::Point(), web_contents, controller);
views::BubbleDialogDelegateView::CreateBubble(bubble);
bubble->Show(send_tab_to_self::SendTabToSelfBubbleViewImpl::USER_GESTURE);
PageActionIconView* icon_view = PageActionIconView* icon_view =
GetLocationBarView()->send_tab_to_self_icon_view(); toolbar_button_provider()
->GetOmniboxPageActionIconContainerView()
->GetPageActionIconView(PageActionIconType::kSendTabToSelf);
if (icon_view) if (icon_view)
bubble->SetHighlightedButton(icon_view); bubble->SetHighlightedButton(icon_view);
views::BubbleDialogDelegateView::CreateBubble(bubble);
bubble->Show(send_tab_to_self::SendTabToSelfBubbleViewImpl::USER_GESTURE);
return bubble; return bubble;
} }
......
...@@ -56,10 +56,6 @@ class LocalCardMigrationIconView; ...@@ -56,10 +56,6 @@ class LocalCardMigrationIconView;
class SaveCardIconView; class SaveCardIconView;
} // namespace autofill } // namespace autofill
namespace send_tab_to_self {
class SendTabToSelfIconView;
}
namespace views { namespace views {
class ImageButton; class ImageButton;
class Label; class Label;
...@@ -157,12 +153,6 @@ class LocationBarView : public LocationBar, ...@@ -157,12 +153,6 @@ class LocationBarView : public LocationBar,
return local_card_migration_icon_view_; return local_card_migration_icon_view_;
} }
// The send tab to self icon. It may not be visible. It will be null when
// |browser_| is null.
send_tab_to_self::SendTabToSelfIconView* send_tab_to_self_icon_view() {
return send_tab_to_self_icon_view_;
}
OmniboxPageActionIconContainerView* OmniboxPageActionIconContainerView*
omnibox_page_action_icon_container_view() { omnibox_page_action_icon_container_view() {
return omnibox_page_action_icon_container_view_; return omnibox_page_action_icon_container_view_;
...@@ -421,10 +411,6 @@ class LocationBarView : public LocationBar, ...@@ -421,10 +411,6 @@ class LocationBarView : public LocationBar,
autofill::LocalCardMigrationIconView* local_card_migration_icon_view_ = autofill::LocalCardMigrationIconView* local_card_migration_icon_view_ =
nullptr; nullptr;
// The send tab to self icon. It will be null when |browser_| is null.
send_tab_to_self::SendTabToSelfIconView* send_tab_to_self_icon_view_ =
nullptr;
// The star for bookmarking. It will be null when |browser_| is null. // The star for bookmarking. It will be null when |browser_| is null.
StarView* star_view_ = nullptr; StarView* star_view_ = nullptr;
......
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