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

Unified Diff: chrome/browser/ui/cocoa/tabs/tab_window_controller.h

Issue 646703002: mac: Use a full-size content view (reland 1). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix interaction with tabStripBackgroundView. Add tests. Created 6 years, 2 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/cocoa/tabs/tab_window_controller.h
diff --git a/chrome/browser/ui/cocoa/tabs/tab_window_controller.h b/chrome/browser/ui/cocoa/tabs/tab_window_controller.h
index 7238b090d55db0b4715989bbd9288d1fcfe31f7d..1c4e9e1b92a03116c967c8f7af536aaf75fd37bd 100644
--- a/chrome/browser/ui/cocoa/tabs/tab_window_controller.h
+++ b/chrome/browser/ui/cocoa/tabs/tab_window_controller.h
@@ -23,10 +23,20 @@
@interface TabWindowController : NSWindowController<NSWindowDelegate> {
@private
+ // Wrapper view around web content, and the developer tools view.
base::scoped_nsobject<FastResizeView> tabContentArea_;
base::scoped_nsobject<NSView> tabStripBackgroundView_;
+
+ // The tab strip overlaps the titlebar of the window.
base::scoped_nsobject<TabStripView> tabStripView_;
+ // No views should be added directly to the root view. Views that overlap
+ // the title bar should be added to the window's contentView. All other views
+ // should be added to chromeContentView_. This allows tab dragging and
+ // fullscreen logic to easily move the views that don't need special
+ // treatment.
+ base::scoped_nsobject<NSView> chromeContentView_;
+
// The child window used during dragging to achieve the opacity tricks.
NSWindow* overlayWindow_;
@@ -40,6 +50,7 @@
@property(readonly, nonatomic) NSView* tabStripBackgroundView;
@property(readonly, nonatomic) TabStripView* tabStripView;
@property(readonly, nonatomic) FastResizeView* tabContentArea;
+@property(readonly, nonatomic) NSView* chromeContentView;
// This is the designated initializer for this class.
- (id)initTabWindowControllerWithTabStrip:(BOOL)hasTabStrip;
@@ -157,6 +168,12 @@
// The tab strip should always be inserted directly above the content view.
- (void)insertTabStripView:(NSView*)tabStripView intoWindow:(NSWindow*)window;
+// The tab strip background view should always be inserted as the back-most
+// subview of the root view. It cannot be a subview of the contentView, as that
+// would cause it to become layer backed, which would cause it to draw on top
+// of non-layer backed content like the window controls.
+- (void)insertTabStripBackgroundViewIntoWindow:(NSWindow*)window;
Andre 2014/10/09 23:15:48 Make this private, since the external caller is no
erikchen 2014/10/10 00:47:45 Done.
+
@end
@interface TabWindowController(ProtectedMethods)

Powered by Google App Engine
This is Rietveld 408576698