OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 <Cocoa/Cocoa.h> | 5 #import <Cocoa/Cocoa.h> |
6 | 6 |
7 // BrowserFrameView is a class whose methods we swizzle into NSGrayFrame | 7 // BrowserFrameView is a class whose methods we swizzle into NSGrayFrame |
8 // (an AppKit framework class) so that we can support custom frame drawing. | 8 // on 10.7 and below, or NSThemeFrame on 10.8 and above, so that we can |
| 9 // support custom frame drawing. This is used with a textured window so that |
| 10 // AppKit does not draw a title bar. |
9 // This class is never to be instantiated on its own. | 11 // This class is never to be instantiated on its own. |
10 // We explored a variety of ways to support custom frame drawing and custom | 12 // We explored a variety of ways to support custom frame drawing and custom |
11 // window widgets. | 13 // window widgets. |
12 // Our requirements were: | 14 // Our requirements were: |
13 // a) that we could fall back on standard system drawing at any time for the | 15 // a) that we could fall back on standard system drawing at any time for the |
14 // "default theme" | 16 // "default theme" |
15 // b) We needed to be able to draw both a background pattern, and an overlay | 17 // b) We needed to be able to draw both a background pattern, and an overlay |
16 // graphic, and we need to be able to set the pattern phase of our background | 18 // graphic, and we need to be able to set the pattern phase of our background |
17 // window. | 19 // window. |
18 // c) We had to be able to support "transparent" themes, so that you could see | 20 // c) We had to be able to support "transparent" themes, so that you could see |
(...skipping 29 matching lines...) Expand all Loading... |
48 + (BOOL)drawWindowThemeInDirtyRect:(NSRect)dirtyRect | 50 + (BOOL)drawWindowThemeInDirtyRect:(NSRect)dirtyRect |
49 forView:(NSView*)view | 51 forView:(NSView*)view |
50 bounds:(NSRect)bounds | 52 bounds:(NSRect)bounds |
51 offset:(NSPoint)offset | 53 offset:(NSPoint)offset |
52 forceBlackBackground:(BOOL)forceBlackBackground; | 54 forceBlackBackground:(BOOL)forceBlackBackground; |
53 | 55 |
54 // Gets the color to draw title text. | 56 // Gets the color to draw title text. |
55 + (NSColor*)titleColorForThemeView:(NSView*)view; | 57 + (NSColor*)titleColorForThemeView:(NSView*)view; |
56 | 58 |
57 @end | 59 @end |
OLD | NEW |