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

Issue 987323002: [MacViews] Frameless app windows: make content view cover title bar. (Closed)

Created:
5 years, 9 months ago by jackhou1
Modified:
5 years, 9 months ago
Reviewers:
tapted, Andre
CC:
chromium-reviews, tfarina, tdanderson+views_chromium.org, chrome-apps-syd-reviews_chromium.org, mac-views-reviews_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

[MacViews] Frameless app windows: make content view cover title bar. AppKit resizes content views when the window resizes by calling [NSView setFrameSize:], but does not take into account [NSWindow contentRectForFrameRect:]. We intercept the former and call the latter. This is similar to the method used by FullSizeContentView. This CL also adds NativeWidgetMacFramelessNSWindow which overrides contentRect <-> frameRect conversion. The frameless NSWindow is used in app windows by overriding NativeWidgetMac. This is similar to AppWindowDesktopNativeWidgetAuraWin which provides a specialized WindowTreeHost. BrowserFrameMac (another NativeWidgetMac subclass) will do the same to draw custom themed frames. BUG=459877 Committed: https://crrev.com/9b683fa2526a4f26f27f4aa136b92748323aa5b4 Cr-Commit-Position: refs/heads/master@{#321251}

Patch Set 1 #

Patch Set 2 : Add some comments. #

Patch Set 3 : WIP: Only use non-borderless windows for app and browser windows. #

Patch Set 4 : Clean up. #

Patch Set 5 : Missed some parts. #

Patch Set 6 : Sync and rebase #

Patch Set 7 : Add basic test. #

Patch Set 8 : Test size of web contents, not content view. #

Total comments: 34

Patch Set 9 : Sync and rebase #

Patch Set 10 : Address comments. #

Total comments: 8

Patch Set 11 : Address comments. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+186 lines, -7 lines) Patch
M chrome/browser/ui/cocoa/apps/native_app_window_cocoa_browsertest.mm View 1 2 3 4 5 6 7 8 9 1 chunk +27 lines, -0 lines 0 comments Download
A chrome/browser/ui/views/apps/app_window_native_widget_mac.h View 1 2 3 4 5 6 7 8 9 1 chunk +26 lines, -0 lines 0 comments Download
A chrome/browser/ui/views/apps/app_window_native_widget_mac.mm View 1 2 3 4 5 6 7 8 9 1 chunk +36 lines, -0 lines 0 comments Download
M chrome/browser/ui/views/apps/chrome_native_app_window_views_mac.h View 1 2 1 chunk +6 lines, -0 lines 0 comments Download
M chrome/browser/ui/views/apps/chrome_native_app_window_views_mac.mm View 1 2 3 4 5 6 7 8 9 2 chunks +11 lines, -0 lines 0 comments Download
A chrome/browser/ui/views/apps/native_widget_mac_frameless_nswindow.h View 1 2 3 4 5 6 7 8 9 10 1 chunk +17 lines, -0 lines 0 comments Download
A chrome/browser/ui/views/apps/native_widget_mac_frameless_nswindow.mm View 1 2 3 4 5 6 7 8 9 1 chunk +26 lines, -0 lines 0 comments Download
M chrome/chrome_browser_ui.gypi View 1 2 3 4 5 6 7 8 9 1 chunk +4 lines, -0 lines 0 comments Download
M ui/views/cocoa/bridged_content_view.mm View 1 2 3 4 5 6 7 8 9 1 chunk +17 lines, -0 lines 0 comments Download
M ui/views/widget/native_widget_mac.h View 1 2 3 4 5 6 7 8 9 1 chunk +4 lines, -0 lines 0 comments Download
M ui/views/widget/native_widget_mac.mm View 1 2 3 4 5 6 7 8 9 10 2 chunks +12 lines, -7 lines 0 comments Download

Messages

Total messages: 19 (4 generated)
jackhou1
5 years, 9 months ago (2015-03-10 16:42:15 UTC) #2
jackhou1
tapted, PTAL This is isolated to app windows now. For browser windows, BrowserFrameMac can also ...
5 years, 9 months ago (2015-03-13 23:32:55 UTC) #3
tapted
I like it! lots of nits mainly. Can we also add to the CL description ...
5 years, 9 months ago (2015-03-18 00:06:39 UTC) #4
jackhou1
https://codereview.chromium.org/987323002/diff/140001/chrome/browser/ui/cocoa/apps/native_app_window_cocoa_browsertest.mm File chrome/browser/ui/cocoa/apps/native_app_window_cocoa_browsertest.mm (right): https://codereview.chromium.org/987323002/diff/140001/chrome/browser/ui/cocoa/apps/native_app_window_cocoa_browsertest.mm#newcode226 chrome/browser/ui/cocoa/apps/native_app_window_cocoa_browsertest.mm:226: [ns_window setFrame:NSMakeRect(50, 50, 200, 200) display:YES]; On 2015/03/18 00:06:38, ...
5 years, 9 months ago (2015-03-18 03:44:40 UTC) #5
tapted
lgtm with the following https://codereview.chromium.org/987323002/diff/180001/chrome/browser/ui/views/apps/native_widget_mac_frameless_nswindow.h File chrome/browser/ui/views/apps/native_widget_mac_frameless_nswindow.h (right): https://codereview.chromium.org/987323002/diff/180001/chrome/browser/ui/views/apps/native_widget_mac_frameless_nswindow.h#newcode8 chrome/browser/ui/views/apps/native_widget_mac_frameless_nswindow.h:8: #import <Cocoa/Cocoa.h> I guess this ...
5 years, 9 months ago (2015-03-18 03:51:59 UTC) #6
tapted
+ mac-views-reviews :)
5 years, 9 months ago (2015-03-18 03:52:47 UTC) #7
jackhou1
https://codereview.chromium.org/987323002/diff/180001/chrome/browser/ui/views/apps/native_widget_mac_frameless_nswindow.h File chrome/browser/ui/views/apps/native_widget_mac_frameless_nswindow.h (right): https://codereview.chromium.org/987323002/diff/180001/chrome/browser/ui/views/apps/native_widget_mac_frameless_nswindow.h#newcode8 chrome/browser/ui/views/apps/native_widget_mac_frameless_nswindow.h:8: #import <Cocoa/Cocoa.h> On 2015/03/18 03:51:58, tapted wrote: > I ...
5 years, 9 months ago (2015-03-18 06:14:17 UTC) #8
Andre
I want to use NativeWidgetMacFramelessNSWindow for the browser window as well. Can we move it ...
5 years, 9 months ago (2015-03-18 20:57:25 UTC) #10
jackhou1
On 2015/03/18 20:57:25, Andre wrote: > I want to use NativeWidgetMacFramelessNSWindow for the browser window ...
5 years, 9 months ago (2015-03-18 21:39:51 UTC) #11
Andre
On 2015/03/18 21:39:51, jackhou1 wrote: > On 2015/03/18 20:57:25, Andre wrote: > > I want ...
5 years, 9 months ago (2015-03-18 23:18:12 UTC) #12
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/987323002/200001
5 years, 9 months ago (2015-03-18 23:49:01 UTC) #15
tapted
On 19 Mar 2015 10:18 am, <andresantoso@chromium.org> wrote: > > On 2015/03/18 21:39:51, jackhou1 wrote: ...
5 years, 9 months ago (2015-03-19 00:28:20 UTC) #16
commit-bot: I haz the power
Committed patchset #11 (id:200001)
5 years, 9 months ago (2015-03-19 00:32:00 UTC) #17
commit-bot: I haz the power
Patchset 11 (id:??) landed as https://crrev.com/9b683fa2526a4f26f27f4aa136b92748323aa5b4 Cr-Commit-Position: refs/heads/master@{#321251}
5 years, 9 months ago (2015-03-19 00:33:33 UTC) #18
Andre
5 years, 9 months ago (2015-03-19 01:45:17 UTC) #19
Message was sent while issue was closed.
On 2015/03/19 00:28:20, tapted wrote:
> On 19 Mar 2015 10:18 am, <mailto:andresantoso@chromium.org> wrote:
> >
> > On 2015/03/18 21:39:51, jackhou1 wrote:
> >>
> >> On 2015/03/18 20:57:25, Andre wrote:
> >> > I want to use NativeWidgetMacFramelessNSWindow for the browser window
> >> > as well. Can we move it out of apps/ subdirectory?
> >
> >
> >> Yeah, I mentioned that to Trent. He said he'd prefer to put it in apps/
> for
> >
> > now
> >>
> >> and move it when it's being used by BrowserFrameMac.
> >
> >
> > I was hoping to use it soon though, see http://crrev.com/1015103003.
> >
> > https://codereview.chromium.org/987323002/
> 
> There's no problem moving it later. It's just unusual to plan for that in
> an orthogonal CL. Plans can often change in review
> 
> To unsubscribe from this group and stop receiving emails from it, send an
email
> to mailto:chromium-reviews+unsubscribe@chromium.org.

SGTM.

Powered by Google App Engine
This is Rietveld 408576698