Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(134)

Issue 200783003: [OriginChip] Add animations for the hiding and showing of the chip. (Closed)

Created:
6 years, 9 months ago by Justin Donnelly
Modified:
6 years, 8 months ago
CC:
chromium-reviews, tfarina, James Su, macourteau, leng
Visibility:
Public.

Description

[OriginChip] Add animations for the hiding and showing of the chip. Also moves some logic into the platform-independent OmniboxEditController. Future work may be able to move more code into this class for sharing across platforms. BUG=338563 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=259639 R=pkasting@chromium.org Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=260228

Patch Set 1 : #

Total comments: 32

Patch Set 2 : Respond to comments, merge #

Total comments: 6

Patch Set 3 : Respond to comments #

Total comments: 6

Patch Set 4 : Respond to comments, merge #

Patch Set 5 : Fix uncompilable GTK unit test and a couple other issues #

Total comments: 2

Patch Set 6 : Respond to comment #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+345 lines, -44 lines) Patch
M chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.h View 1 2 chunks +5 lines, -0 lines 0 comments Download
M chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.mm View 1 2 3 1 chunk +8 lines, -0 lines 0 comments Download
M chrome/browser/ui/cocoa/omnibox/omnibox_view_mac_unittest.mm View 1 1 chunk +3 lines, -0 lines 0 comments Download
M chrome/browser/ui/gtk/location_bar_view_gtk.h View 1 2 2 chunks +4 lines, -0 lines 0 comments Download
M chrome/browser/ui/gtk/location_bar_view_gtk.cc View 1 2 2 chunks +8 lines, -0 lines 0 comments Download
M chrome/browser/ui/gtk/omnibox/omnibox_view_gtk_unittest.cc View 1 2 3 4 1 chunk +2 lines, -0 lines 0 comments Download
M chrome/browser/ui/omnibox/omnibox_edit_controller.h View 1 2 chunks +13 lines, -0 lines 0 comments Download
M chrome/browser/ui/omnibox/omnibox_edit_controller.cc View 1 2 2 chunks +17 lines, -0 lines 0 comments Download
M chrome/browser/ui/omnibox/omnibox_edit_unittest.cc View 1 1 chunk +3 lines, -0 lines 0 comments Download
M chrome/browser/ui/omnibox/omnibox_view.h View 1 chunk +3 lines, -0 lines 0 comments Download
M chrome/browser/ui/omnibox/omnibox_view.cc View 2 chunks +9 lines, -11 lines 0 comments Download
M chrome/browser/ui/toolbar/test_toolbar_model.h View 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/ui/toolbar/test_toolbar_model.cc View 1 chunk +4 lines, -0 lines 0 comments Download
M chrome/browser/ui/toolbar/toolbar_model.h View 1 2 1 chunk +10 lines, -4 lines 0 comments Download
M chrome/browser/ui/toolbar/toolbar_model_impl.h View 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/ui/toolbar/toolbar_model_impl.cc View 1 chunk +4 lines, -0 lines 0 comments Download
M chrome/browser/ui/views/frame/browser_view.cc View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/ui/views/location_bar/location_bar_view.h View 1 2 8 chunks +34 lines, -9 lines 0 comments Download
M chrome/browser/ui/views/location_bar/location_bar_view.cc View 1 2 3 4 5 10 chunks +112 lines, -3 lines 2 comments Download
M chrome/browser/ui/views/location_bar/origin_chip_view.h View 1 2 3 4 chunks +11 lines, -2 lines 0 comments Download
M chrome/browser/ui/views/location_bar/origin_chip_view.cc View 1 2 7 chunks +43 lines, -12 lines 0 comments Download
M chrome/browser/ui/views/omnibox/omnibox_view_views.h View 1 2 6 chunks +16 lines, -0 lines 0 comments Download
M chrome/browser/ui/views/omnibox/omnibox_view_views.cc View 1 2 3 5 chunks +32 lines, -1 line 0 comments Download
M chrome/browser/ui/views/toolbar/toolbar_origin_chip_view.cc View 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 36 (0 generated)
Justin Donnelly
6 years, 9 months ago (2014-03-20 20:27:46 UTC) #1
Justin Donnelly
Rachel, can you test this on Mac? It shouldn't produce any visible change.
6 years, 9 months ago (2014-03-20 20:33:03 UTC) #2
groby-ooo-7-16
Mac seems to work fine. No crashes, no behavior changes (that I can observe ;)
6 years, 9 months ago (2014-03-20 23:35:54 UTC) #3
groby-ooo-7-16
And while I'm here, a few Cocoa nits :) https://codereview.chromium.org/200783003/diff/90001/chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.h File chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.h (right): https://codereview.chromium.org/200783003/diff/90001/chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.h#newcode179 chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.h:179: ...
6 years, 9 months ago (2014-03-20 23:38:53 UTC) #4
Justin Donnelly
https://codereview.chromium.org/200783003/diff/90001/chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.h File chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.h (right): https://codereview.chromium.org/200783003/diff/90001/chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.h#newcode179 chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.h:179: // OmniboxEditController: On 2014/03/20 23:38:53, groby wrote: > What ...
6 years, 9 months ago (2014-03-21 21:15:57 UTC) #5
Peter Kasting
Sorry, my comments here are split between two different patch sets. https://codereview.chromium.org/200783003/diff/90001/chrome/browser/ui/views/location_bar/location_bar_view.cc File chrome/browser/ui/views/location_bar/location_bar_view.cc (right): ...
6 years, 9 months ago (2014-03-21 21:22:09 UTC) #6
Justin Donnelly
https://codereview.chromium.org/200783003/diff/90001/chrome/browser/ui/views/location_bar/location_bar_view.cc File chrome/browser/ui/views/location_bar/location_bar_view.cc (right): https://codereview.chromium.org/200783003/diff/90001/chrome/browser/ui/views/location_bar/location_bar_view.cc#newcode755 chrome/browser/ui/views/location_bar/location_bar_view.cc:755: base::SplitStringUsingSubstr(formatted_url, host, &substrings); On 2014/03/21 21:22:10, Peter Kasting wrote: ...
6 years, 9 months ago (2014-03-24 22:59:36 UTC) #7
groby-ooo-7-16
BTW: Is there any chance to break this into a few smaller CLs? It seems ...
6 years, 9 months ago (2014-03-25 20:13:46 UTC) #8
Justin Donnelly
On 2014/03/25 20:13:46, groby wrote: > BTW: Is there any chance to break this into ...
6 years, 9 months ago (2014-03-25 21:18:39 UTC) #9
Justin Donnelly
Peter, can you take another look when you get a chance? If you're busy, no ...
6 years, 9 months ago (2014-03-25 21:20:07 UTC) #10
groby-ooo-7-16
> But I'll take a look. You're probably right that it could be split up. ...
6 years, 9 months ago (2014-03-25 21:28:42 UTC) #11
Peter Kasting
LGTM https://codereview.chromium.org/200783003/diff/140024/chrome/browser/ui/views/location_bar/location_bar_view.cc File chrome/browser/ui/views/location_bar/location_bar_view.cc (right): https://codereview.chromium.org/200783003/diff/140024/chrome/browser/ui/views/location_bar/location_bar_view.cc#newcode760 chrome/browser/ui/views/location_bar/location_bar_view.cc:760: const int w = gfx::Canvas::GetStringWidth(text_leading_host, font_list); Nit: I'd ...
6 years, 9 months ago (2014-03-25 22:20:39 UTC) #12
Justin Donnelly
https://codereview.chromium.org/200783003/diff/140024/chrome/browser/ui/views/location_bar/location_bar_view.cc File chrome/browser/ui/views/location_bar/location_bar_view.cc (right): https://codereview.chromium.org/200783003/diff/140024/chrome/browser/ui/views/location_bar/location_bar_view.cc#newcode760 chrome/browser/ui/views/location_bar/location_bar_view.cc:760: const int w = gfx::Canvas::GetStringWidth(text_leading_host, font_list); On 2014/03/25 22:20:40, ...
6 years, 9 months ago (2014-03-26 16:15:47 UTC) #13
Justin Donnelly
On 2014/03/25 21:28:42, groby wrote: > Both that, and that I assume the (smaller) refactor ...
6 years, 9 months ago (2014-03-26 16:21:10 UTC) #14
Justin Donnelly
The CQ bit was checked by jdonnelly@chromium.org
6 years, 9 months ago (2014-03-26 16:21:21 UTC) #15
Justin Donnelly
The CQ bit was unchecked by jdonnelly@chromium.org
6 years, 9 months ago (2014-03-26 16:21:31 UTC) #16
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/jdonnelly@chromium.org/200783003/260001
6 years, 9 months ago (2014-03-26 16:21:32 UTC) #17
Justin Donnelly
The CQ bit was checked by jdonnelly@chromium.org
6 years, 9 months ago (2014-03-26 16:21:54 UTC) #18
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 9 months ago (2014-03-26 17:02:49 UTC) #19
commit-bot: I haz the power
Try jobs failed on following builders: tryserver.chromium on linux_chromium_chromeos_rel
6 years, 9 months ago (2014-03-26 17:02:49 UTC) #20
Justin Donnelly
The CQ bit was checked by jdonnelly@chromium.org
6 years, 9 months ago (2014-03-26 17:06:40 UTC) #21
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/jdonnelly@chromium.org/200783003/260001
6 years, 9 months ago (2014-03-26 17:07:53 UTC) #22
commit-bot: I haz the power
Change committed as 259639
6 years, 9 months ago (2014-03-26 18:40:51 UTC) #23
Justin Donnelly
Added the missing methods to the mock in the GTK test. I'm not sure if ...
6 years, 9 months ago (2014-03-27 13:59:07 UTC) #24
Justin Donnelly
Peter, can you take a quick look at the latest patch set? I fixed a ...
6 years, 9 months ago (2014-03-27 14:37:36 UTC) #25
Justin Donnelly
On 2014/03/27 13:59:07, Justin Donnelly wrote: > Added the missing methods to the mock in ...
6 years, 9 months ago (2014-03-27 19:26:52 UTC) #26
Peter Kasting
LGTM https://codereview.chromium.org/200783003/diff/460001/chrome/browser/ui/views/location_bar/location_bar_view.cc File chrome/browser/ui/views/location_bar/location_bar_view.cc (right): https://codereview.chromium.org/200783003/diff/460001/chrome/browser/ui/views/location_bar/location_bar_view.cc#newcode1175 chrome/browser/ui/views/location_bar/location_bar_view.cc:1175: omnibox_view_->SelectAll(true); Nit: Please write a comment about why ...
6 years, 9 months ago (2014-03-27 20:56:15 UTC) #27
Justin Donnelly
https://codereview.chromium.org/200783003/diff/460001/chrome/browser/ui/views/location_bar/location_bar_view.cc File chrome/browser/ui/views/location_bar/location_bar_view.cc (right): https://codereview.chromium.org/200783003/diff/460001/chrome/browser/ui/views/location_bar/location_bar_view.cc#newcode1175 chrome/browser/ui/views/location_bar/location_bar_view.cc:1175: omnibox_view_->SelectAll(true); On 2014/03/27 20:56:16, Peter Kasting wrote: > Nit: ...
6 years, 9 months ago (2014-03-27 21:07:21 UTC) #28
Justin Donnelly
The CQ bit was checked by jdonnelly@chromium.org
6 years, 9 months ago (2014-03-27 21:07:29 UTC) #29
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/jdonnelly@chromium.org/200783003/480001
6 years, 9 months ago (2014-03-27 21:11:33 UTC) #30
Justin Donnelly
The CQ bit was unchecked by jdonnelly@chromium.org
6 years, 9 months ago (2014-03-28 04:44:31 UTC) #31
Justin Donnelly
The CQ bit was checked by jdonnelly@chromium.org
6 years, 9 months ago (2014-03-28 04:44:52 UTC) #32
groby-ooo-7-16
https://codereview.chromium.org/200783003/diff/480001/chrome/browser/ui/views/location_bar/location_bar_view.cc File chrome/browser/ui/views/location_bar/location_bar_view.cc (right): https://codereview.chromium.org/200783003/diff/480001/chrome/browser/ui/views/location_bar/location_bar_view.cc#newcode746 chrome/browser/ui/views/location_bar/location_bar_view.cc:746: const GURL url = GetWebContents()->GetURL(); Curious - why set ...
6 years, 9 months ago (2014-03-28 16:34:29 UTC) #33
Justin Donnelly
The CQ bit was unchecked by jdonnelly@chromium.org
6 years, 9 months ago (2014-03-28 18:59:06 UTC) #34
Greg Billock
Committed patchset #6 manually as r260228 (presubmit successful).
6 years, 9 months ago (2014-03-28 19:11:41 UTC) #35
Justin Donnelly
6 years, 8 months ago (2014-04-01 16:57:06 UTC) #36
Message was sent while issue was closed.
https://codereview.chromium.org/200783003/diff/480001/chrome/browser/ui/views...
File chrome/browser/ui/views/location_bar/location_bar_view.cc (right):

https://codereview.chromium.org/200783003/diff/480001/chrome/browser/ui/views...
chrome/browser/ui/views/location_bar/location_bar_view.cc:746: const GURL url =
GetWebContents()->GetURL();
On 2014/03/28 16:34:30, groby wrote:
> Curious - why set that on every layout, instead of just on animation start?

Storing the host value below crossed my mind, but it struck me as premature
optimization.  It's reasonably cheap to calculate (10's of microseconds) and the
name of the resulting variable would add a distracting bit of cognitive load to
readers of the class ("host_name_used_while_animating" or some such).

Powered by Google App Engine
This is Rietveld 408576698