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

Side by Side Diff: chrome/browser/ui/panels/panel_window_controller_cocoa.h

Issue 7734003: Implement basic theming for panel titlebars. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 9 years, 3 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 | Annotate | Revision Log
OLDNEW
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 #ifndef CHROME_BROWSER_UI_PANELS_PANEL_WINDOW_CONTROLLER_COCOA_H_ 5 #ifndef CHROME_BROWSER_UI_PANELS_PANEL_WINDOW_CONTROLLER_COCOA_H_
6 #define CHROME_BROWSER_UI_PANELS_PANEL_WINDOW_CONTROLLER_COCOA_H_ 6 #define CHROME_BROWSER_UI_PANELS_PANEL_WINDOW_CONTROLLER_COCOA_H_
7 7
8 // A class acting as the Objective-C controller for the Panel window 8 // A class acting as the Objective-C controller for the Panel window
9 // object. Handles interactions between Cocoa and the cross-platform 9 // object. Handles interactions between Cocoa and the cross-platform
10 // code. Each window has a single titlebar and is managed/owned by Panel. 10 // code. Each window has a single titlebar and is managed/owned by Panel.
11 11
12 #import <Cocoa/Cocoa.h> 12 #import <Cocoa/Cocoa.h>
13 13
14 #import "base/mac/cocoa_protocols.h" 14 #import "base/mac/cocoa_protocols.h"
15 #include "base/memory/scoped_ptr.h" 15 #include "base/memory/scoped_ptr.h"
16 #import "chrome/browser/ui/cocoa/themed_window.h"
16 17
17 @class FindBarCocoaController; 18 @class FindBarCocoaController;
18 class PanelBrowserWindowCocoa; 19 class PanelBrowserWindowCocoa;
19 @class PanelTitlebarViewCocoa; 20 @class PanelTitlebarViewCocoa;
20 21
21 @interface PanelWindowControllerCocoa : NSWindowController<NSWindowDelegate> { 22 @interface PanelWindowControllerCocoa : NSWindowController<NSWindowDelegate> {
22 @private 23 @private
23 IBOutlet PanelTitlebarViewCocoa* titlebar_view_; 24 IBOutlet PanelTitlebarViewCocoa* titlebar_view_;
24 scoped_ptr<PanelBrowserWindowCocoa> windowShim_; 25 scoped_ptr<PanelBrowserWindowCocoa> windowShim_;
25 } 26 }
26 27
27 // Load the browser window nib and do any Cocoa-specific initialization. 28 // Load the browser window nib and do any Cocoa-specific initialization.
28 - (id)initWithBrowserWindow:(PanelBrowserWindowCocoa*)window; 29 - (id)initWithBrowserWindow:(PanelBrowserWindowCocoa*)window;
29 30
31 - (ui::ThemeProvider*)themeProvider;
32 - (ThemedWindowStyle)themedWindowStyle;
33 - (NSPoint)themePatternPhase;
34
30 // Returns the TabContents' native view. It renders the content of the web page 35 // Returns the TabContents' native view. It renders the content of the web page
31 // in the Panel. 36 // in the Panel.
32 - (NSView*)tabContentsView; 37 - (NSView*)tabContentsView;
33 38
34 // Sometimes (when we animate the size of the window) we want to stop resizing 39 // Sometimes (when we animate the size of the window) we want to stop resizing
35 // the TabContents's cocoa view to avoid unnecessary churn and issues 40 // the TabContents's cocoa view to avoid unnecessary churn and issues
36 // that can be caused by sizes near 0. 41 // that can be caused by sizes near 0.
37 - (void)disableTabContentsViewAutosizing; 42 - (void)disableTabContentsViewAutosizing;
38 - (void)enableTabContentsViewAutosizing; 43 - (void)enableTabContentsViewAutosizing;
39 44
40 // Shows the window for the first time. Only happens once. 45 // Shows the window for the first time. Only happens once.
41 - (void)revealAnimatedWithFrame:(const NSRect&)frame; 46 - (void)revealAnimatedWithFrame:(const NSRect&)frame;
42 47
43 // Adds the FindBar controller's view to this Panel. Must only be 48 // Adds the FindBar controller's view to this Panel. Must only be
44 // called once per PanelWindowControllerCocoa. 49 // called once per PanelWindowControllerCocoa.
45 - (void)addFindBar:(FindBarCocoaController*)findBarCocoaController; 50 - (void)addFindBar:(FindBarCocoaController*)findBarCocoaController;
46 51
47 // Initiate the closing of the panel, starting from the platform-independent 52 // Initiate the closing of the panel, starting from the platform-independent
48 // layer. This will take care of PanelManager, other panels and close the 53 // layer. This will take care of PanelManager, other panels and close the
49 // native window at the end. 54 // native window at the end.
50 - (void)closePanel; 55 - (void)closePanel;
51 56
52 // Accessor for titlebar view. 57 // Accessor for titlebar view.
53 - (PanelTitlebarViewCocoa*)titlebarView; 58 - (PanelTitlebarViewCocoa*)titlebarView;
54 59
55 @end // @interface PanelWindowController 60 @end // @interface PanelWindowController
56 61
57 #endif // CHROME_BROWSER_UI_PANELS_PANEL_WINDOW_CONTROLLER_COCOA_H_ 62 #endif // CHROME_BROWSER_UI_PANELS_PANEL_WINDOW_CONTROLLER_COCOA_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698