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

Side by Side Diff: chrome/browser/ui/cocoa/tabs/tab_window_controller.mm

Issue 2091873002: [Material][Mac] Fix tabstrip and avatar button hierarchy (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « chrome/browser/ui/cocoa/tabs/tab_window_controller.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #import "chrome/browser/ui/cocoa/tabs/tab_window_controller.h" 5 #import "chrome/browser/ui/cocoa/tabs/tab_window_controller.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #import "base/mac/sdk_forward_declarations.h" 8 #import "base/mac/sdk_forward_declarations.h"
9 #import "chrome/browser/ui/cocoa/browser_window_layout.h" 9 #import "chrome/browser/ui/cocoa/browser_window_layout.h"
10 #import "chrome/browser/ui/cocoa/fast_resize_view.h" 10 #import "chrome/browser/ui/cocoa/fast_resize_view.h"
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after
175 [[self tabStripView] setInATabDraggingOverlayWindow:YES]; 175 [[self tabStripView] setInATabDraggingOverlayWindow:YES];
176 [[overlayWindow_ contentView] addSubview:originalContentView_]; 176 [[overlayWindow_ contentView] addSubview:originalContentView_];
177 177
178 [overlayWindow_ orderFront:nil]; 178 [overlayWindow_ orderFront:nil];
179 } else if (!useOverlay && overlayWindow_) { 179 } else if (!useOverlay && overlayWindow_) {
180 DCHECK(originalContentView_); 180 DCHECK(originalContentView_);
181 181
182 // Return the original window's tab strip view and content view to their 182 // Return the original window's tab strip view and content view to their
183 // places. The TabStripView always needs to be in front of the window's 183 // places. The TabStripView always needs to be in front of the window's
184 // content view and therefore it should always be added after the content 184 // content view and therefore it should always be added after the content
185 // view is set. It needs to be positioned at the bottom of the view 185 // view is set. It needs to be positioned below the avatar button to ensure
186 // hierarchy to ensure that it does not overlap the avatar button icon. 186 // that its overlay will not overlap it.
187 [[window contentView] addSubview:originalContentView_ 187 [[window contentView] addSubview:originalContentView_
188 positioned:NSWindowBelow 188 positioned:NSWindowBelow
189 relativeTo:nil]; 189 relativeTo:nil];
190 originalContentView_.frame = [[window contentView] bounds]; 190 originalContentView_.frame = [[window contentView] bounds];
191 [[window contentView] addSubview:[self tabStripView] 191 [[window contentView] addSubview:[self tabStripView]
192 positioned:NSWindowBelow 192 positioned:NSWindowBelow
193 relativeTo:nil]; 193 relativeTo:[self avatarView]];
194 [[self tabStripView] setInATabDraggingOverlayWindow:NO]; 194 [[self tabStripView] setInATabDraggingOverlayWindow:NO];
195 [[window contentView] updateTrackingAreas]; 195 [[window contentView] updateTrackingAreas];
196 196
197 [focusBeforeOverlay_ restoreFocusInWindow:window]; 197 [focusBeforeOverlay_ restoreFocusInWindow:window];
198 focusBeforeOverlay_.reset(); 198 focusBeforeOverlay_.reset();
199 199
200 [window display]; 200 [window display];
201 [window removeChildWindow:overlayWindow_]; 201 [window removeChildWindow:overlayWindow_];
202 202
203 [overlayWindow_ orderOut:nil]; 203 [overlayWindow_ orderOut:nil];
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
308 NOTIMPLEMENTED(); 308 NOTIMPLEMENTED();
309 return NO; 309 return NO;
310 } 310 }
311 311
312 - (CGFloat)menubarOffset { 312 - (CGFloat)menubarOffset {
313 // Subclasses should implement this. 313 // Subclasses should implement this.
314 NOTIMPLEMENTED(); 314 NOTIMPLEMENTED();
315 return 0; 315 return 0;
316 } 316 }
317 317
318 - (NSView*)avatarView {
319 return nil;
320 }
321
318 - (NSString*)activeTabTitle { 322 - (NSString*)activeTabTitle {
319 // subclass must implement 323 // subclass must implement
320 NOTIMPLEMENTED(); 324 NOTIMPLEMENTED();
321 return @""; 325 return @"";
322 } 326 }
323 327
324 - (BOOL)hasTabStrip { 328 - (BOOL)hasTabStrip {
325 // Subclasses should implement this. 329 // Subclasses should implement this.
326 NOTIMPLEMENTED(); 330 NOTIMPLEMENTED();
327 return YES; 331 return YES;
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
393 [visualEffectView addSubview:tabStripBackgroundView_]; 397 [visualEffectView addSubview:tabStripBackgroundView_];
394 } 398 }
395 399
396 // Called when the size of the window content area has changed. Override to 400 // Called when the size of the window content area has changed. Override to
397 // position specific views. Base class implementation does nothing. 401 // position specific views. Base class implementation does nothing.
398 - (void)layoutSubviews { 402 - (void)layoutSubviews {
399 NOTIMPLEMENTED(); 403 NOTIMPLEMENTED();
400 } 404 }
401 405
402 @end 406 @end
OLDNEW
« no previous file with comments | « chrome/browser/ui/cocoa/tabs/tab_window_controller.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698