Chromium Code Reviews| Index: chrome/browser/ui/cocoa/tabs/tab_window_controller.mm |
| diff --git a/chrome/browser/ui/cocoa/tabs/tab_window_controller.mm b/chrome/browser/ui/cocoa/tabs/tab_window_controller.mm |
| index cd5a115b3e2e659be0e41cbee73634072d5a7d60..409f556963022a6f36a79665c2a549fe81197740 100644 |
| --- a/chrome/browser/ui/cocoa/tabs/tab_window_controller.mm |
| +++ b/chrome/browser/ui/cocoa/tabs/tab_window_controller.mm |
| @@ -63,6 +63,23 @@ |
| @end |
| +@interface ChromeContentView : NSView |
|
tapted
2017/03/22 22:40:00
comment like
// Subview of the NSWindow's content
Sidney San Martín
2017/03/22 23:29:59
Done.
|
| +@end |
| + |
| +@implementation ChromeContentView |
| + |
| +#pragma mark - NSView Overrides |
|
tapted
2017/03/22 22:40:00
optional: a comment here like
// NSView overrides
Sidney San Martín
2017/03/22 23:29:59
Done. Xcode likes `#pragma mark -` (there's a popu
|
| + |
| +// Since Auto Layout and frame-based layout behave differently in small but |
| +// important ways (e.g. Auto Layout can restrict window resizing, frame-based |
| +// layout doesn't log a warning when a view's autoresizing mask can't be |
| +// maintained), ensure that it's on instead of letting it depend on content. |
| ++ (BOOL)requiresConstraintBasedLayout { |
| + return YES; |
| +} |
| + |
| +@end |
| + |
| @implementation TabWindowController |
| - (id)initTabWindowControllerWithTabStrip:(BOOL)hasTabStrip |
| @@ -80,7 +97,7 @@ |
| if ((self = [super initWithWindow:window])) { |
| [[self window] setDelegate:self]; |
| - chromeContentView_.reset([[NSView alloc] |
| + chromeContentView_.reset([[ChromeContentView alloc] |
|
tapted
2017/03/22 22:40:00
I think this will capture popups, but not packaged
Sidney San Martín
2017/03/22 23:29:59
Oh, good to know. I may be working on that change
|
| initWithFrame:NSMakeRect(0, 0, kDefaultWidth, kDefaultHeight)]); |
| [chromeContentView_ |
| setAutoresizingMask:NSViewWidthSizable | NSViewHeightSizable]; |