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

Issue 388453002: MacViews: NativeWidget -> Widget notifications: fullscreen, activation. (Closed)

Created:
6 years, 5 months ago by tapted
Modified:
6 years, 2 months ago
Reviewers:
Robert Sesek, Andre, sky
CC:
chromium-reviews, tfarina, ben+views_chromium.org, tdanderson+views_chromium.org, mac-views-reviews_chromium.org, chrome-apps-syd-reviews_chromium.org
Project:
chromium
Visibility:
Public.

Description

MacViews: NativeWidget -> Widget notifications: fullscreen, activation. Fullscreen is asynchronous on Mac, so NativeWidgetMac needs to coordinate with the ViewsNSWindowDelegate to behave in the manner views code expects. Part of this is maintaining the restored bounds, which Cocoa doesn't provide access to. Activation also goes through the ViewsNSWindowDelegate. It's simpler but needs an interactive_ui_test, which is added. Other NSWindowDelegate messages are deferred to a follow-up. Maximize is "implemented" as a no-op on Mac, since it's indistinguishable from a large window (whereas views code typically expects maximize to remove window borders). This CL gets the following views_unittests passing: WidgetTest.GetRestoredBounds WidgetTest.ExitFullscreenRestoreState WidgetTest.FullscreenFrameLayout Many Cocoa-native tests are also added to ensure user-initiated operations are correctly observed. BUG=403679, 378134 Committed: https://crrev.com/50d05e112bdee6085dc461eba5435eb82ec60a46 Cr-Commit-Position: refs/heads/master@{#299263}

Patch Set 1 #

Patch Set 2 : Fix menus in interactive_ui_tests #

Patch Set 3 : rebase #

Patch Set 4 : Smarter fullscreening #

Patch Set 5 : Rollback some stuff for a simpler patch #

Patch Set 6 : Oh man. fullscreen tests are hard. #

Total comments: 8

Patch Set 7 : More tests. Still need: visibility observer, bounds observer, external move/resize #

Patch Set 8 : Rollback more stuff that is missing coverage -- turns out visibility is HARD #

Patch Set 9 : respond to comments #

Total comments: 13

Patch Set 10 : respond to comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+406 lines, -24 lines) Patch
M base/mac/sdk_forward_declarations.h View 1 2 3 4 5 1 chunk +3 lines, -0 lines 0 comments Download
M base/mac/sdk_forward_declarations.mm View 1 2 3 4 5 1 chunk +9 lines, -0 lines 0 comments Download
M chrome/browser/ui/cocoa/apps/native_app_window_cocoa_browsertest.mm View 1 2 3 4 5 6 7 8 9 1 chunk +0 lines, -12 lines 0 comments Download
M ui/views/cocoa/bridged_native_widget.h View 1 2 3 4 5 6 7 8 9 2 chunks +32 lines, -0 lines 0 comments Download
M ui/views/cocoa/bridged_native_widget.mm View 1 2 3 4 5 6 7 8 9 5 chunks +68 lines, -1 line 0 comments Download
M ui/views/cocoa/bridged_native_widget_unittest.mm View 1 2 3 4 5 6 7 8 9 6 chunks +181 lines, -1 line 0 comments Download
M ui/views/cocoa/views_nswindow_delegate.mm View 1 2 3 4 5 6 7 8 9 2 chunks +36 lines, -0 lines 0 comments Download
M ui/views/widget/native_widget_mac.mm View 1 2 3 4 5 6 7 4 chunks +9 lines, -7 lines 0 comments Download
M ui/views/widget/native_widget_mac_interactive_uitest.mm View 1 2 3 4 5 6 3 chunks +55 lines, -2 lines 0 comments Download
M ui/views/widget/widget_unittest.cc View 1 2 3 4 5 6 7 4 chunks +13 lines, -1 line 0 comments Download

Messages

Total messages: 19 (7 generated)
Andre
https://codereview.chromium.org/388453002/diff/140001/ui/views/cocoa/bridged_native_widget_unittest.mm File ui/views/cocoa/bridged_native_widget_unittest.mm (right): https://codereview.chromium.org/388453002/diff/140001/ui/views/cocoa/bridged_native_widget_unittest.mm#newcode77 ui/views/cocoa/bridged_native_widget_unittest.mm:77: object:nil]; I think this should be object:window instead object:nil ...
6 years, 2 months ago (2014-10-05 02:54:18 UTC) #5
Andre
LGTM I agree we shouldn't need the maximize stuff.
6 years, 2 months ago (2014-10-05 18:14:21 UTC) #6
tapted
Hi Andre - PTAL. I think this is ready to go. I've pruned it back ...
6 years, 2 months ago (2014-10-07 11:21:12 UTC) #8
Andre
On 2014/10/07 11:21:12, tapted wrote: > Hi Andre - PTAL. I think this is ready ...
6 years, 2 months ago (2014-10-08 17:22:48 UTC) #9
tapted
Hi sky, rsesek please take a look for OWNERS sky: ui/views rsesek: base/mac (or anything ...
6 years, 2 months ago (2014-10-09 06:58:09 UTC) #11
Robert Sesek
https://codereview.chromium.org/388453002/diff/240001/base/mac/sdk_forward_declarations.mm File base/mac/sdk_forward_declarations.mm (right): https://codereview.chromium.org/388453002/diff/240001/base/mac/sdk_forward_declarations.mm#newcode17 base/mac/sdk_forward_declarations.mm:17: NSString* const NSWindowDidEnterFullScreenNotification = This and the constant below ...
6 years, 2 months ago (2014-10-09 14:09:41 UTC) #12
sky
LGTM (assuming you can get rsesek happy). Also, how about sending me a patch that ...
6 years, 2 months ago (2014-10-09 17:46:25 UTC) #13
tapted
Thanks Robert - PTAL. On 2014/10/09 17:46:25, sky wrote: > Also, how about sending me ...
6 years, 2 months ago (2014-10-10 11:57:10 UTC) #14
Robert Sesek
LGTM https://codereview.chromium.org/388453002/diff/240001/ui/views/cocoa/views_nswindow_delegate.mm File ui/views/cocoa/views_nswindow_delegate.mm (right): https://codereview.chromium.org/388453002/diff/240001/ui/views/cocoa/views_nswindow_delegate.mm#newcode28 ui/views/cocoa/views_nswindow_delegate.mm:28: parent_->OnTargetFullscreenStateChanged(false); On 2014/10/10 11:57:10, tapted wrote: > So ...
6 years, 2 months ago (2014-10-10 15:09:43 UTC) #15
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/388453002/270001
6 years, 2 months ago (2014-10-12 22:52:45 UTC) #17
commit-bot: I haz the power
Committed patchset #10 (id:270001)
6 years, 2 months ago (2014-10-12 23:31:46 UTC) #18
commit-bot: I haz the power
6 years, 2 months ago (2014-10-12 23:32:33 UTC) #19
Message was sent while issue was closed.
Patchset 10 (id:??) landed as
https://crrev.com/50d05e112bdee6085dc461eba5435eb82ec60a46
Cr-Commit-Position: refs/heads/master@{#299263}

Powered by Google App Engine
This is Rietveld 408576698