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

Issue 329743002: MacViews: Initial skeleton for implementing NativeWidgetMac (Closed)

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

Description

MacViews: Initial skeleton for implementing NativeWidgetMac This adds two classes under ui/views/cocoa: BridgedNativeWidget (a C++ class which bridges an NSWindow) and BridgedContentView (an Objective-C "root" NSView which bridges a views::View). With respect to NativeWidgetMac, BridgedNativeWidget performs a role similar to aura::Window on Aura platforms. Among other things, it will (soon) be a ui::LayerOwner. It serves for implementation-hiding: it owns Objective-C objects for NativeWidgetMac so that native_widget_mac.h does not force .cc files to become .mm. It also allows implementation-sharing between NativeWidgetMac and, later, DesktopNativeWidgetMac. BridgedContentView allows messages to feed through from Cocoa into toolkit-views, by implementing the required Objective-C interfaces and bridging to C++ code. Adds 3 tests, and gets 17 others passing. Total 202/468 passing. BUG=378134 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=276957

Patch Set 1 #

Patch Set 2 : slice out NativeTheme change to crrev/328103002 #

Patch Set 3 : ->origin().IsOrigin probably nicer (and not a tautology) #

Patch Set 4 : rebase to master now we have stats #

Total comments: 10

Patch Set 5 : respond to comments #

Patch Set 6 : rebase to master (header conflict with r276556) #

Total comments: 4

Patch Set 7 : respond to comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+305 lines, -13 lines) Patch
A ui/views/cocoa/bridged_content_view.h View 1 chunk +33 lines, -0 lines 0 comments Download
A ui/views/cocoa/bridged_content_view.mm View 1 2 3 4 5 6 1 chunk +50 lines, -0 lines 0 comments Download
A ui/views/cocoa/bridged_native_widget.h View 1 chunk +46 lines, -0 lines 0 comments Download
A ui/views/cocoa/bridged_native_widget.mm View 1 2 3 4 5 6 1 chunk +43 lines, -0 lines 0 comments Download
A ui/views/cocoa/bridged_native_widget_unittest.mm View 1 2 3 4 5 6 1 chunk +107 lines, -0 lines 0 comments Download
M ui/views/views.gyp View 1 2 3 4 5 2 chunks +5 lines, -0 lines 0 comments Download
M ui/views/widget/native_widget_mac.h View 1 2 3 4 5 2 chunks +3 lines, -2 lines 0 comments Download
M ui/views/widget/native_widget_mac.mm View 1 2 3 4 5 7 chunks +18 lines, -11 lines 0 comments Download

Messages

Total messages: 12 (0 generated)
tapted
andre: for a general Mac review sky: owners/design/review This is a polished version of crrev/309483009 ...
6 years, 6 months ago (2014-06-11 08:46:19 UTC) #1
sky
LGTM https://codereview.chromium.org/329743002/diff/70001/ui/views/cocoa/bridged_content_view.mm File ui/views/cocoa/bridged_content_view.mm (right): https://codereview.chromium.org/329743002/diff/70001/ui/views/cocoa/bridged_content_view.mm#newcode19 ui/views/cocoa/bridged_content_view.mm:19: if ((self = [super initWithFrame:initialFrame])) { nit: no ...
6 years, 6 months ago (2014-06-11 16:15:53 UTC) #2
Andre
lgtm https://codereview.chromium.org/329743002/diff/70001/ui/views/cocoa/bridged_native_widget.mm File ui/views/cocoa/bridged_native_widget.mm (right): https://codereview.chromium.org/329743002/diff/70001/ui/views/cocoa/bridged_native_widget.mm#newcode7 ui/views/cocoa/bridged_native_widget.mm:7: #include "base/logging.h" Is this for DCHECK? Seems inconsistent ...
6 years, 6 months ago (2014-06-11 18:02:52 UTC) #3
Andre
lgtm https://codereview.chromium.org/329743002/diff/70001/ui/views/cocoa/bridged_native_widget.mm File ui/views/cocoa/bridged_native_widget.mm (right): https://codereview.chromium.org/329743002/diff/70001/ui/views/cocoa/bridged_native_widget.mm#newcode7 ui/views/cocoa/bridged_native_widget.mm:7: #include "base/logging.h" Is this for DCHECK? Seems inconsistent ...
6 years, 6 months ago (2014-06-11 18:02:52 UTC) #4
tapted
+rsesek since he left some feedback in crrev/309483009 otherwise comments addressed, and rebased on ToT ...
6 years, 6 months ago (2014-06-12 09:13:12 UTC) #5
Robert Sesek
Nice, LGTM https://codereview.chromium.org/329743002/diff/110001/ui/views/cocoa/bridged_content_view.mm File ui/views/cocoa/bridged_content_view.mm (right): https://codereview.chromium.org/329743002/diff/110001/ui/views/cocoa/bridged_content_view.mm#newcode26 ui/views/cocoa/bridged_content_view.mm:26: @synthesize hostedView = hostedView_; @synthesize comes after ...
6 years, 6 months ago (2014-06-12 13:42:28 UTC) #6
sky
https://codereview.chromium.org/329743002/diff/70001/ui/views/cocoa/bridged_content_view.mm File ui/views/cocoa/bridged_content_view.mm (right): https://codereview.chromium.org/329743002/diff/70001/ui/views/cocoa/bridged_content_view.mm#newcode19 ui/views/cocoa/bridged_content_view.mm:19: if ((self = [super initWithFrame:initialFrame])) { On 2014/06/12 09:13:12, ...
6 years, 6 months ago (2014-06-12 16:51:47 UTC) #7
Robert Sesek
https://codereview.chromium.org/329743002/diff/70001/ui/views/cocoa/bridged_content_view.mm File ui/views/cocoa/bridged_content_view.mm (right): https://codereview.chromium.org/329743002/diff/70001/ui/views/cocoa/bridged_content_view.mm#newcode19 ui/views/cocoa/bridged_content_view.mm:19: if ((self = [super initWithFrame:initialFrame])) { On 2014/06/12 16:51:47, ...
6 years, 6 months ago (2014-06-12 17:31:37 UTC) #8
tapted
On 2014/06/12 16:51:47, sky wrote: > I realize this is all allowed, but shouldn't we ...
6 years, 6 months ago (2014-06-13 00:14:07 UTC) #9
tapted
The CQ bit was checked by tapted@chromium.org
6 years, 6 months ago (2014-06-13 02:59:17 UTC) #10
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/tapted@chromium.org/329743002/150001
6 years, 6 months ago (2014-06-13 03:00:58 UTC) #11
commit-bot: I haz the power
6 years, 6 months ago (2014-06-13 07:24:05 UTC) #12
Message was sent while issue was closed.
Change committed as 276957

Powered by Google App Engine
This is Rietveld 408576698