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

Side by Side Diff: chrome/browser/ui/cocoa/themed_window.h

Issue 1680773006: Implement Material Design for Mac toolbar. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@md_master
Patch Set: Change button hover and pressed styles. Created 4 years, 9 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
OLDNEW
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 {
(...skipping 17 matching lines...) Expand all
28 THEME_IMAGE_ALIGN_WITH_FRAME, 28 THEME_IMAGE_ALIGN_WITH_FRAME,
29 // Aligns the top of the theme image with the top of the tabs. 29 // Aligns the top of the theme image with the top of the tabs.
30 // Use this for IDR_THEME_TAB_BACKGROUND and IDR_THEME_TOOLBAR. 30 // Use this for IDR_THEME_TAB_BACKGROUND and IDR_THEME_TOOLBAR.
31 THEME_IMAGE_ALIGN_WITH_TAB_STRIP 31 THEME_IMAGE_ALIGN_WITH_TAB_STRIP
32 }; 32 };
33 33
34 // Implemented by windows that support theming. 34 // Implemented by windows that support theming.
35 @interface NSWindow (ThemeProvider) 35 @interface NSWindow (ThemeProvider)
36 - (const ThemeProvider*)themeProvider; 36 - (const ThemeProvider*)themeProvider;
37 - (ThemedWindowStyle)themedWindowStyle; 37 - (ThemedWindowStyle)themedWindowStyle;
38 - (BOOL)inIncognitoMode;
39 // Return YES if using the system (i.e. non-custom) theme and Incognito mode.
40 - (BOOL)inIncognitoModeWithSystemTheme;
41 // Return YES if Incongnito, or a custom theme with a dark toolbar color or
42 // light tab text.
43 - (BOOL)hasDarkTheme;
38 44
39 // Returns the position in window coordinates that the top left of a theme 45 // Returns the position in window coordinates that the top left of a theme
40 // image with |alignment| should be painted at. The result of this method can 46 // image with |alignment| should be painted at. The result of this method can
41 // be used in conjunction with [NSGraphicsContext cr_setPatternPhase:] to set 47 // be used in conjunction with [NSGraphicsContext cr_setPatternPhase:] to set
42 // the offset of pattern colors. 48 // the offset of pattern colors.
43 - (NSPoint)themeImagePositionForAlignment:(ThemeImageAlignment)alignment; 49 - (NSPoint)themeImagePositionForAlignment:(ThemeImageAlignment)alignment;
44 @end 50 @end
45 51
46 // Adopted by views that want to redraw when the theme changed, or when the 52 // Adopted by views that want to redraw when the theme changed, or when the
47 // window's active status changed. 53 // window's active status changed.
48 @protocol ThemedWindowDrawing 54 @protocol ThemedWindowDrawing
49 55
50 // Called by the window controller when the theme changed. 56 // Called by the window controller when the theme changed.
51 - (void)windowDidChangeTheme; 57 - (void)windowDidChangeTheme;
52 58
53 // Called by the window controller when the window gained or lost main window 59 // Called by the window controller when the window gained or lost main window
54 // status. 60 // status.
55 - (void)windowDidChangeActive; 61 - (void)windowDidChangeActive;
56 62
57 @end 63 @end
58 64
59 #endif // CHROME_BROWSER_UI_COCOA_THEMED_WINDOW_H_ 65 #endif // CHROME_BROWSER_UI_COCOA_THEMED_WINDOW_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/cocoa/profiles/avatar_icon_controller.mm ('k') | chrome/browser/ui/cocoa/themed_window.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698