Index: ui/gfx/mac/nswindow_frame_controls.h |
diff --git a/ui/gfx/mac/nswindow_frame_controls.h b/ui/gfx/mac/nswindow_frame_controls.h |
index 7ec7ab7ee0f6b7aecb549f422c51682a4d218c55..6239a242aa7b19abd8955e8b3e9215ad56a90a11 100644 |
--- a/ui/gfx/mac/nswindow_frame_controls.h |
+++ b/ui/gfx/mac/nswindow_frame_controls.h |
@@ -5,12 +5,22 @@ |
#ifndef UI_GFX_MAC_NSWINDOW_FRAME_CONTROLS_H_ |
#define UI_GFX_MAC_NSWINDOW_FRAME_CONTROLS_H_ |
-#include "ui/gfx/gfx_export.h" |
+#import <Cocoa/Cocoa.h> |
-@class NSWindow; |
+#include "base/mac/scoped_nsobject.h" |
+#include "third_party/skia/include/core/SkColor.h" |
+#include "ui/gfx/gfx_export.h" |
-namespace gfx { |
+// A view that paints a solid color. Used to change the title bar background. |
+GFX_EXPORT @interface TitlebarBackgroundView : NSView { |
+ @private |
+ base::scoped_nsobject<NSColor> color_; |
+ base::scoped_nsobject<NSColor> inactiveColor_; |
+} |
+- (void)setColor:(NSColor*)color inactiveColor:(NSColor*)inactiveColor; |
+@end |
+ namespace gfx { |
class Size; |
// Set whether the window can be fullscreened. |
@@ -26,6 +36,10 @@ GFX_EXPORT void ApplyNSWindowSizeConstraints(NSWindow* window, |
bool can_resize, |
bool can_fullscreen); |
+// Adds a TitlebarBackgroundView to the [[window contentView] superView]. |
+GFX_EXPORT void AddColoredTitlebarToNSWindow( |
jackhou1
2015/04/24 07:05:03
Should we merge TitlebarBackgroundView and TabStri
tapted
2015/05/06 02:58:29
I'd lean towards "nah" - probably not enough in co
|
+ NSWindow * window, SkColor active_color, SkColor inactive_color); |
+ |
} // namespace gfx |
#endif // UI_GFX_MAC_NSWINDOW_FRAME_CONTROLS_H_ |