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

Issue 1305143008: [Mac] Implement LocationBarViewMac::UpdateLocationBarVisibility() (Closed)

Created:
5 years, 3 months ago by dominickn
Modified:
5 years, 1 month ago
Reviewers:
tapted
CC:
chromium-reviews, chrome-apps-syd-reviews_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

[Mac] Implement LocationBarViewMac::UpdateLocationBarVisibility() This CL allows bookmark apps opened in windows on Mac to show and hide the location bar in a manner consistent with other platforms. The location bar is hidden when the window is at the same origin as the bookmark app, and shown when the window is navigated away from that origin. The resizing is implemented in a manner consistent with the bookmarks bar. Prior to this CL, app windows and popups did not display the full toolbar view. Instead, they only displayed the location bar view (an NSTextField subclass). This view-level substitution prevented the app window toolbar from being resized in the same manner as the bookmarks bar. This CL refactors the implementation so that the view-level distinction is removed. App windows and popups which only display the location bar now use the full toolbar view, with the location bar resized to be full width and the undesired navigation and wrench buttons hidden. BUG=491792, 499741 Committed: https://crrev.com/5c98d330e26e8547932f7fdac8ef1b55e928c782 Cr-Commit-Position: refs/heads/master@{#356226}

Patch Set 1 #

Total comments: 10

Patch Set 2 : Addressing reviewer comments #

Patch Set 3 : Fix comment #

Total comments: 16

Patch Set 4 : Implement a location bar only view for the toolbar #

Patch Set 5 : Remove unnecessary super view calls #

Patch Set 6 : Adding and fixing unit tests #

Total comments: 38

Patch Set 7 : Addressing reviewer feedback #

Total comments: 36

Patch Set 8 : Restoring popup windows to their original look #

Total comments: 12

Patch Set 9 : Addressing reviewer feedback #

Total comments: 8

Patch Set 10 : Addressing reviewer feedback #

Patch Set 11 : More explicit size testing #

Total comments: 6

Patch Set 12 : Addressing nits #

Unified diffs Side-by-side diffs Delta from patch set Stats (+197 lines, -72 lines) Patch
M chrome/browser/ui/cocoa/browser_window_controller.mm View 1 2 3 1 chunk +2 lines, -1 line 0 comments Download
M chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.h View 1 2 3 4 5 6 7 8 9 1 chunk +3 lines, -0 lines 0 comments Download
M chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.mm View 1 2 3 4 5 6 7 8 9 10 11 4 chunks +11 lines, -1 line 0 comments Download
M chrome/browser/ui/cocoa/toolbar/toolbar_controller.h View 1 2 3 4 5 6 7 8 9 10 11 4 chunks +7 lines, -17 lines 0 comments Download
M chrome/browser/ui/cocoa/toolbar/toolbar_controller.mm View 1 2 3 4 5 6 7 8 9 10 11 10 chunks +70 lines, -45 lines 0 comments Download
M chrome/browser/ui/cocoa/toolbar/toolbar_controller_unittest.mm View 1 2 3 4 5 6 7 8 9 10 8 chunks +102 lines, -6 lines 0 comments Download
M chrome/browser/ui/cocoa/toolbar/toolbar_view_cocoa.h View 1 1 chunk +2 lines, -2 lines 0 comments Download

Messages

Total messages: 32 (7 generated)
dominickn
PTAL - I'm not sure if I've done this in a good/correct way or not. ...
5 years, 3 months ago (2015-09-07 23:56:36 UTC) #2
tapted
The CL description should be Something like `[Mac] Implement LocationBarViewMac::UpdateLocationBarVisibility()` Then, there is already machinery ...
5 years, 3 months ago (2015-09-08 05:55:06 UTC) #3
dominickn
This is great, thanks for the detailed feedback! I wasn't originally sure if going the ...
5 years, 3 months ago (2015-09-08 06:15:31 UTC) #4
dominickn
Thanks for the feedback! PTAL - now implemented using AnimatableView and in as consistent a ...
5 years, 2 months ago (2015-10-09 06:37:02 UTC) #5
tapted
Can you also add a test to browser_window_layout_unittest.mm? https://codereview.chromium.org/1305143008/diff/30011/chrome/browser/ui/cocoa/browser_window_controller.mm File chrome/browser/ui/cocoa/browser_window_controller.mm (right): https://codereview.chromium.org/1305143008/diff/30011/chrome/browser/ui/cocoa/browser_window_controller.mm#newcode994 chrome/browser/ui/cocoa/browser_window_controller.mm:994: - ...
5 years, 2 months ago (2015-10-12 23:56:43 UTC) #6
tapted
https://codereview.chromium.org/1305143008/diff/30011/chrome/browser/ui/cocoa/browser_window_layout.h File chrome/browser/ui/cocoa/browser_window_layout.h (right): https://codereview.chromium.org/1305143008/diff/30011/chrome/browser/ui/cocoa/browser_window_layout.h#newcode57 chrome/browser/ui/cocoa/browser_window_layout.h:57: BOOL toolbarHidden; Also, maybe this can be obsoleted by ...
5 years, 2 months ago (2015-10-13 00:00:19 UTC) #7
dominickn
Having done a bit more snooping, it turns out that this is more complex than ...
5 years, 2 months ago (2015-10-13 03:03:21 UTC) #8
tapted
On 2015/10/13 03:03:21, dominickn wrote: > Having done a bit more snooping, it turns out ...
5 years, 2 months ago (2015-10-13 07:25:02 UTC) #9
dominickn
Acknowledged. I'll have more of a think about this tomorrow. If I change the way ...
5 years, 2 months ago (2015-10-13 10:39:31 UTC) #10
dominickn
Alright, this latest version has eliminated the split view and implemented a new method to ...
5 years, 2 months ago (2015-10-15 06:22:28 UTC) #12
tapted
Still going through review, so this was a bit rushed (all I have for now ...
5 years, 2 months ago (2015-10-16 00:06:17 UTC) #13
tapted
https://codereview.chromium.org/1305143008/diff/110001/chrome/browser/ui/cocoa/toolbar/toolbar_controller.mm File chrome/browser/ui/cocoa/toolbar/toolbar_controller.mm (right): https://codereview.chromium.org/1305143008/diff/110001/chrome/browser/ui/cocoa/toolbar/toolbar_controller.mm#newcode766 chrome/browser/ui/cocoa/toolbar/toolbar_controller.mm:766: if (hasToolbar_ || !hasLocationBar_) I think the only caller ...
5 years, 2 months ago (2015-10-17 00:44:15 UTC) #14
dominickn
Thanks! On 2015/10/12 23:56:43, tapted (traveling until Oct22) wrote: > Can you also add a ...
5 years, 2 months ago (2015-10-20 04:40:22 UTC) #16
tapted
Looking pretty good! As well as window resizing, we also need to check that the ...
5 years, 2 months ago (2015-10-20 06:31:09 UTC) #17
tapted
Also, we shouldn't change the appearance of popups. And probably bookmark apps with a location ...
5 years, 2 months ago (2015-10-20 22:32:21 UTC) #18
dominickn
Popup windows have been restored to their previous look, with bookmark app windows now looking ...
5 years, 1 month ago (2015-10-26 02:53:04 UTC) #20
tapted
https://codereview.chromium.org/1305143008/diff/130001/chrome/browser/ui/cocoa/toolbar/toolbar_controller.mm File chrome/browser/ui/cocoa/toolbar/toolbar_controller.mm (right): https://codereview.chromium.org/1305143008/diff/130001/chrome/browser/ui/cocoa/toolbar/toolbar_controller.mm#newcode74 chrome/browser/ui/cocoa/toolbar/toolbar_controller.mm:74: const NSTimeInterval kToolBarAnimationDuration = 0.12; On 2015/10/26 02:53:04, dominickn ...
5 years, 1 month ago (2015-10-26 04:40:56 UTC) #21
dominickn
Thanks! https://codereview.chromium.org/1305143008/diff/130001/chrome/browser/ui/cocoa/toolbar/toolbar_controller.mm File chrome/browser/ui/cocoa/toolbar/toolbar_controller.mm (right): https://codereview.chromium.org/1305143008/diff/130001/chrome/browser/ui/cocoa/toolbar/toolbar_controller.mm#newcode74 chrome/browser/ui/cocoa/toolbar/toolbar_controller.mm:74: const NSTimeInterval kToolBarAnimationDuration = 0.12; On 2015/10/26 04:40:55, ...
5 years, 1 month ago (2015-10-26 06:42:43 UTC) #22
tapted
now that setHasToolbar is back to being called only once during construction, there are a ...
5 years, 1 month ago (2015-10-26 07:55:34 UTC) #23
dominickn
Thanks! https://codereview.chromium.org/1305143008/diff/170001/chrome/browser/ui/cocoa/toolbar/toolbar_controller.mm File chrome/browser/ui/cocoa/toolbar/toolbar_controller.mm (right): https://codereview.chromium.org/1305143008/diff/170001/chrome/browser/ui/cocoa/toolbar/toolbar_controller.mm#newcode589 chrome/browser/ui/cocoa/toolbar/toolbar_controller.mm:589: // Display the toolbar with only the location ...
5 years, 1 month ago (2015-10-26 23:31:32 UTC) #24
tapted
lgtm % nits https://codereview.chromium.org/1305143008/diff/210001/chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.mm File chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.mm (right): https://codereview.chromium.org/1305143008/diff/210001/chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.mm#newcode205 chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.mm:205: // If a visibility change is ...
5 years, 1 month ago (2015-10-26 23:48:09 UTC) #25
dominickn
Thanks for all of the help and patience! :) https://codereview.chromium.org/1305143008/diff/210001/chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.mm File chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.mm (right): https://codereview.chromium.org/1305143008/diff/210001/chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.mm#newcode205 chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.mm:205: ...
5 years, 1 month ago (2015-10-27 00:15:17 UTC) #26
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1305143008/230001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1305143008/230001
5 years, 1 month ago (2015-10-27 02:35:02 UTC) #30
commit-bot: I haz the power
Committed patchset #12 (id:230001)
5 years, 1 month ago (2015-10-27 03:00:25 UTC) #31
commit-bot: I haz the power
5 years, 1 month ago (2015-10-27 03:01:48 UTC) #32
Message was sent while issue was closed.
Patchset 12 (id:??) landed as
https://crrev.com/5c98d330e26e8547932f7fdac8ef1b55e928c782
Cr-Commit-Position: refs/heads/master@{#356226}

Powered by Google App Engine
This is Rietveld 408576698