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

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, 4 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 16
17 namespace ui {
18 class ThemeProvider;
19 };
20
17 @class FindBarCocoaController; 21 @class FindBarCocoaController;
18 class PanelBrowserWindowCocoa; 22 class PanelBrowserWindowCocoa;
19 @class PanelTitlebarViewCocoa; 23 @class PanelTitlebarViewCocoa;
20 24
21 @interface PanelWindowControllerCocoa : NSWindowController<NSWindowDelegate> { 25 @interface PanelWindowControllerCocoa : NSWindowController<NSWindowDelegate> {
22 @private 26 @private
23 IBOutlet PanelTitlebarViewCocoa* titlebar_view_; 27 IBOutlet PanelTitlebarViewCocoa* titlebar_view_;
24 scoped_ptr<PanelBrowserWindowCocoa> windowShim_; 28 scoped_ptr<PanelBrowserWindowCocoa> windowShim_;
25 } 29 }
26 30
27 // Load the browser window nib and do any Cocoa-specific initialization. 31 // Load the browser window nib and do any Cocoa-specific initialization.
28 - (id)initWithBrowserWindow:(PanelBrowserWindowCocoa*)window; 32 - (id)initWithBrowserWindow:(PanelBrowserWindowCocoa*)window;
29 33
34 - (ui::ThemeProvider*)themeProvider;
Dmitry Titov 2011/08/25 00:08:21 ThemedBrowserWindow looks for 3 selectors on the c
dcheng 2011/08/25 18:48:54 We probably need all 3 eventually, but as I mentio
Dmitry Titov 2011/08/25 19:24:51 Since you are adding plumbing in this patch, I thi
dcheng 2011/08/26 23:04:42 I've implemented the other two methods. There's so
35
30 // Returns the TabContents' native view. It renders the content of the web page 36 // Returns the TabContents' native view. It renders the content of the web page
31 // in the Panel. 37 // in the Panel.
32 - (NSView*)tabContentsView; 38 - (NSView*)tabContentsView;
33 39
34 // Sometimes (when we animate the size of the window) we want to stop resizing 40 // 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 41 // the TabContents's cocoa view to avoid unnecessary churn and issues
36 // that can be caused by sizes near 0. 42 // that can be caused by sizes near 0.
37 - (void)disableTabContentsViewAutosizing; 43 - (void)disableTabContentsViewAutosizing;
38 - (void)enableTabContentsViewAutosizing; 44 - (void)enableTabContentsViewAutosizing;
39 45
40 // Shows the window for the first time. Only happens once. 46 // Shows the window for the first time. Only happens once.
41 - (void)revealAnimatedWithFrame:(const NSRect&)frame; 47 - (void)revealAnimatedWithFrame:(const NSRect&)frame;
42 48
43 // Adds the FindBar controller's view to this Panel. Must only be 49 // Adds the FindBar controller's view to this Panel. Must only be
44 // called once per PanelWindowControllerCocoa. 50 // called once per PanelWindowControllerCocoa.
45 - (void)addFindBar:(FindBarCocoaController*)findBarCocoaController; 51 - (void)addFindBar:(FindBarCocoaController*)findBarCocoaController;
46 52
47 // Initiate the closing of the panel, starting from the platform-independent 53 // Initiate the closing of the panel, starting from the platform-independent
48 // layer. This will take care of PanelManager, other panels and close the 54 // layer. This will take care of PanelManager, other panels and close the
49 // native window at the end. 55 // native window at the end.
50 - (void)closePanel; 56 - (void)closePanel;
51 57
52 // Accessor for titlebar view. 58 // Accessor for titlebar view.
53 - (PanelTitlebarViewCocoa*)titlebarView; 59 - (PanelTitlebarViewCocoa*)titlebarView;
54 60
55 @end // @interface PanelWindowController 61 @end // @interface PanelWindowController
56 62
57 #endif // CHROME_BROWSER_UI_PANELS_PANEL_WINDOW_CONTROLLER_COCOA_H_ 63 #endif // CHROME_BROWSER_UI_PANELS_PANEL_WINDOW_CONTROLLER_COCOA_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698