[go: up one dir, main page]

[SendTabToSelf] UI changes of omnibox icon

- Highlight the icon when showing the bubble.
- Change the icon to a bigger size.

(cherry picked from commit 4708ae72494f65545abd0c08da59c7cafc289af1)

Bug: 970900
Change-Id: If1f5519eafb3f49fca35862024003992ad2cfc7d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1656433
Reviewed-by: Avi Drissman <avi@chromium.org>
Commit-Queue: Tina Wang <tinazwang@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#668707}
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1663316
Reviewed-by: Jeffrey Cohen <jeffreycohen@chromium.org>
Cr-Commit-Position: refs/branch-heads/3809@{#390}
Cr-Branched-From: d82dec1a818f378c464ba307ddd9c92133eac355-refs/heads/master@{#665002}
diff --git a/chrome/app/vector_icons/send_tab_to_self.icon b/chrome/app/vector_icons/send_tab_to_self.icon
index a303c736..1c7966a 100644
--- a/chrome/app/vector_icons/send_tab_to_self.icon
+++ b/chrome/app/vector_icons/send_tab_to_self.icon
@@ -3,40 +3,32 @@
 // found in the LICENSE file.
 
 CANVAS_DIMENSIONS, 16,
-MOVE_TO, 0, 0,
-R_H_LINE_TO, 16,
-R_V_LINE_TO, 16,
+MOVE_TO, 2.5f, 4.21f,
+R_H_LINE_TO, 11.25f,
+V_LINE_TO, 3,
+H_LINE_TO, 2.5f,
+R_CUBIC_TO, -0.69f, 0, -1.25f, 0.54f, -1.25f, 1.21f,
+R_V_LINE_TO, 6.63f,
 H_LINE_TO, 0,
+R_V_LINE_TO, 1.81f,
+R_H_LINE_TO, 8.75f,
+R_V_LINE_TO, -1.81f,
+H_LINE_TO, 2.5f,
+R_V_LINE_TO, -6.63f,
 CLOSE,
-MOVE_TO, 3.4f, 4.41f,
-R_H_LINE_TO, 10.8f,
-V_LINE_TO, 3.25f,
-H_LINE_TO, 3.4f,
-R_CUBIC_TO, -0.66f, 0, -1.2f, 0.52f, -1.2f, 1.16f,
-R_V_LINE_TO, 6.36f,
-H_LINE_TO, 1,
-R_V_LINE_TO, 1.74f,
-R_H_LINE_TO, 8.4f,
-R_V_LINE_TO, -1.74f,
-R_H_LINE_TO, -6,
+R_MOVE_TO, 11.88f, 1.21f,
+R_H_LINE_TO, -3.75f,
+R_ARC_TO, 0.62f, 0.62f, 0, 0, 0, -0.62f, 0.6f,
+R_V_LINE_TO, 6.03f,
+R_CUBIC_TO, 0, 0.33f, 0.28f, 0.6f, 0.63f, 0.6f,
+R_H_LINE_TO, 3.75f,
+ARC_TO, 0.62f, 0.62f, 0, 0, 0, 15, 12.04f,
+V_LINE_TO, 6.01f,
+R_ARC_TO, 0.62f, 0.62f, 0, 0, 0, -0.62f, -0.6f,
 CLOSE,
-R_MOVE_TO, 11.4f, 1.16f,
-R_H_LINE_TO, -3.6f,
-R_CUBIC_TO, -0.33f, 0, -0.6f, 0.26f, -0.6f, 0.58f,
-R_V_LINE_TO, 5.79f,
-R_CUBIC_TO, 0, 0.32f, 0.27f, 0.58f, 0.6f, 0.58f,
-R_H_LINE_TO, 3.6f,
-R_CUBIC_TO, 0.33f, 0, 0.6f, -0.26f, 0.6f, -0.58f,
-V_LINE_TO, 6.14f,
-R_ARC_TO, 0.59f, 0.59f, 0, 0, 0, -0.6f, -0.58f,
-CLOSE,
-R_MOVE_TO, -0.6f, 5.21f,
-R_H_LINE_TO, -2.4f,
-R_V_LINE_TO, -4.05f,
-R_H_LINE_TO, 2.4f,
-CLOSE,
-MOVE_TO, 0, 0,
-R_H_LINE_TO, 16,
-R_V_LINE_TO, 16,
-H_LINE_TO, 0,
+R_MOVE_TO, -0.62f, 5.42f,
+R_H_LINE_TO, -2.5f,
+V_LINE_TO, 6.62f,
+R_H_LINE_TO, 2.5f,
+R_V_LINE_TO, 4.22f,
 CLOSE
\ No newline at end of file
diff --git a/chrome/browser/ui/views/frame/browser_view.cc b/chrome/browser/ui/views/frame/browser_view.cc
index 02d72d6..b7960ce 100644
--- a/chrome/browser/ui/views/frame/browser_view.cc
+++ b/chrome/browser/ui/views/frame/browser_view.cc
@@ -1404,17 +1404,12 @@
   }
 
   LocationBarView* location_bar = GetLocationBarView();
-  PageActionIconView* icon_view =
-      (PageActionIconView*)location_bar->send_tab_to_self_icon_view();
   views::View* anchor_view = location_bar;
 
   send_tab_to_self::SendTabToSelfBubbleViewImpl* bubble =
       new send_tab_to_self::SendTabToSelfBubbleViewImpl(
           anchor_view, gfx::Point(), web_contents, controller);
 
-  if (icon_view) {
-    bubble->SetHighlightedButton(icon_view);
-  }
   views::BubbleDialogDelegateView::CreateBubble(bubble);
   bubble->Show(send_tab_to_self::SendTabToSelfBubbleViewImpl::USER_GESTURE);
 
diff --git a/chrome/browser/ui/views/send_tab_to_self/send_tab_to_self_bubble_view_impl.cc b/chrome/browser/ui/views/send_tab_to_self/send_tab_to_self_bubble_view_impl.cc
index 88b94eb5..50f33ae 100644
--- a/chrome/browser/ui/views/send_tab_to_self/send_tab_to_self_bubble_view_impl.cc
+++ b/chrome/browser/ui/views/send_tab_to_self/send_tab_to_self_bubble_view_impl.cc
@@ -90,13 +90,16 @@
 
 void SendTabToSelfBubbleViewImpl::Show(DisplayReason reason) {
   ShowForReason(reason);
-  // Keeps the send tab to self icon in omnibox while showing the bubble.
-  BrowserView::GetBrowserViewForBrowser(
-      chrome::FindBrowserWithWebContents(web_contents_))
-      ->toolbar_button_provider()
-      ->GetOmniboxPageActionIconContainerView()
-      ->GetPageActionIconView(PageActionIconType::kSendTabToSelf)
-      ->SetVisible(true);
+  // Keeps the send tab to self icon in omnibox and be highlighted while
+  // showing the bubble.
+  views::Button* highlight_button =
+      BrowserView::GetBrowserViewForBrowser(
+          chrome::FindBrowserWithWebContents(web_contents_))
+          ->toolbar_button_provider()
+          ->GetOmniboxPageActionIconContainerView()
+          ->GetPageActionIconView(PageActionIconType::kSendTabToSelf);
+  highlight_button->SetVisible(true);
+  SetHighlightedButton(highlight_button);
 }
 
 void SendTabToSelfBubbleViewImpl::Init() {