OLD | NEW |
---|---|
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 #ifndef CHROME_BROWSER_UI_COCOA_THEMED_WINDOW_H_ | 5 #ifndef CHROME_BROWSER_UI_COCOA_THEMED_WINDOW_H_ |
6 #define CHROME_BROWSER_UI_COCOA_THEMED_WINDOW_H_ | 6 #define CHROME_BROWSER_UI_COCOA_THEMED_WINDOW_H_ |
7 | 7 |
8 #import <Cocoa/Cocoa.h> | 8 #import <Cocoa/Cocoa.h> |
9 | 9 |
10 namespace ui { | 10 namespace ui { |
11 class ThemeProvider; | 11 class ThemeProvider; |
12 } | 12 } |
13 using ui::ThemeProvider; | 13 using ui::ThemeProvider; |
14 | 14 |
15 // Bit flags; mix-and-match as necessary. | 15 // Bit flags; mix-and-match as necessary. |
16 enum { | 16 enum { |
17 THEMED_NORMAL = 0, | 17 THEMED_NORMAL = 0, |
18 THEMED_INCOGNITO = 1 << 0, | 18 THEMED_INCOGNITO = 1 << 0, |
19 THEMED_POPUP = 1 << 1, | 19 THEMED_POPUP = 1 << 1, |
20 THEMED_DEVTOOLS = 1 << 2 | 20 THEMED_DEVTOOLS = 1 << 2 |
21 }; | 21 }; |
22 typedef NSUInteger ThemedWindowStyle; | 22 typedef NSUInteger ThemedWindowStyle; |
23 | 23 |
24 // Indicates how the top of the theme image should be aligned. | |
25 enum ThemePatternAlignment { | |
26 THEME_PATTERN_ALIGN_WITH_FRAME, | |
27 THEME_PATTERN_ALIGN_WITH_TAB_STRIP | |
Nico
2013/07/17 18:03:04
Add comments explaining what these do and when to
| |
28 }; | |
29 | |
24 // Implemented by windows that support theming. | 30 // Implemented by windows that support theming. |
25 | 31 |
26 @interface NSWindow (ThemeProvider) | 32 @interface NSWindow (ThemeProvider) |
27 - (ThemeProvider*)themeProvider; | 33 - (ThemeProvider*)themeProvider; |
28 - (ThemedWindowStyle)themedWindowStyle; | 34 - (ThemedWindowStyle)themedWindowStyle; |
29 - (NSPoint)themePatternPhase; | 35 - (NSPoint)themePatternPhaseForAlignment:(ThemePatternAlignment)alignment; |
30 @end | 36 @end |
31 | 37 |
32 #endif // CHROME_BROWSER_UI_COCOA_THEMED_WINDOW_H_ | 38 #endif // CHROME_BROWSER_UI_COCOA_THEMED_WINDOW_H_ |
OLD | NEW |