Commit 3ba7178f authored by spqchan's avatar spqchan Committed by Commit bot

[Material][Mac] Fix tabstrip and avatar button hierarchy

BUG=620614

Review-Url: https://codereview.chromium.org/2091873002
Cr-Commit-Position: refs/heads/master@{#402687}
parent b2602438
......@@ -1912,6 +1912,10 @@ willAnimateFromState:(BookmarkBar::State)oldState
return [presentationModeController_ menubarOffset];
}
- (NSView*)avatarView {
return [avatarButtonController_ view];
}
- (void)enterWebContentFullscreen {
// HTML5 Fullscreen should only use AppKit fullscreen in 10.10+.
// However, if the user is using multiple monitors and turned off
......
......@@ -159,6 +159,9 @@
// the screen (tab strip, omnibox, bookmark bar, etc). Ranges from 0 to -22.
- (CGFloat)menubarOffset;
// Returns the view of the avatar button.
- (NSView*)avatarView;
// Tell the window that it needs to call performClose: as soon as the current
// drag is complete. This prevents a window (and its overlay) from going away
// during a drag.
......
......@@ -182,15 +182,15 @@
// Return the original window's tab strip view and content view to their
// places. The TabStripView always needs to be in front of the window's
// content view and therefore it should always be added after the content
// view is set. It needs to be positioned at the bottom of the view
// hierarchy to ensure that it does not overlap the avatar button icon.
// view is set. It needs to be positioned below the avatar button to ensure
// that its overlay will not overlap it.
[[window contentView] addSubview:originalContentView_
positioned:NSWindowBelow
relativeTo:nil];
originalContentView_.frame = [[window contentView] bounds];
[[window contentView] addSubview:[self tabStripView]
positioned:NSWindowBelow
relativeTo:nil];
relativeTo:[self avatarView]];
[[self tabStripView] setInATabDraggingOverlayWindow:NO];
[[window contentView] updateTrackingAreas];
......@@ -315,6 +315,10 @@
return 0;
}
- (NSView*)avatarView {
return nil;
}
- (NSString*)activeTabTitle {
// subclass must implement
NOTIMPLEMENTED();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment