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

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

Issue 7538010: Make BrowserWindow::CreateFindBar non-static so that it can be overridden by Panels. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Also change TestBrowserWindow 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 @class FindBarCocoaController;
17 class PanelBrowserWindowCocoa; 18 class PanelBrowserWindowCocoa;
18 @class PanelTitlebarViewCocoa; 19 @class PanelTitlebarViewCocoa;
19 20
20 @interface PanelWindowControllerCocoa : NSWindowController<NSWindowDelegate> { 21 @interface PanelWindowControllerCocoa : NSWindowController<NSWindowDelegate> {
21 @private 22 @private
22 IBOutlet PanelTitlebarViewCocoa* titlebar_view_; 23 IBOutlet PanelTitlebarViewCocoa* titlebar_view_;
23 scoped_ptr<PanelBrowserWindowCocoa> windowShim_; 24 scoped_ptr<PanelBrowserWindowCocoa> windowShim_;
25 scoped_nsobject<FindBarCocoaController> findBarCocoaController_;
Dmitry Titov 2011/08/01 19:57:48 Why do we need to retain the controller here? I th
24 } 26 }
25 27
26 // Load the browser window nib and do any Cocoa-specific initialization. 28 // Load the browser window nib and do any Cocoa-specific initialization.
27 - (id)initWithBrowserWindow:(PanelBrowserWindowCocoa*)window; 29 - (id)initWithBrowserWindow:(PanelBrowserWindowCocoa*)window;
28 30
29 // Returns the TabContents' native view. It renders the content of the web page 31 // Returns the TabContents' native view. It renders the content of the web page
30 // in the Panel. 32 // in the Panel.
31 - (NSView*)tabContentsView; 33 - (NSView*)tabContentsView;
32 34
33 // Sometimes (when we animate the size of the window) we want to stop resizing 35 // Sometimes (when we animate the size of the window) we want to stop resizing
34 // the TabContents's cocoa view to avoid unnecessary churn and issues 36 // the TabContents's cocoa view to avoid unnecessary churn and issues
35 // that can be caused by sizes near 0. 37 // that can be caused by sizes near 0.
36 - (void)disableTabContentsViewAutosizing; 38 - (void)disableTabContentsViewAutosizing;
37 - (void)enableTabContentsViewAutosizing; 39 - (void)enableTabContentsViewAutosizing;
38 40
39 // Shows the window for the first time. Only happens once. 41 // Shows the window for the first time. Only happens once.
40 - (void)revealAnimatedWithFrame:(const NSRect&)frame; 42 - (void)revealAnimatedWithFrame:(const NSRect&)frame;
41 43
44 // Retains the given FindBarCocoaController and adds its view to this
45 // Panel. Must only be called once per PanelWindowControllerCocoa.
46 - (void)addFindBar:(FindBarCocoaController*)findBarCocoaController;
47
42 // Initiate the closing of the panel, starting from the platform-independent 48 // Initiate the closing of the panel, starting from the platform-independent
43 // layer. This will take care of PanelManager, other panels and close the 49 // layer. This will take care of PanelManager, other panels and close the
44 // native window at the end. 50 // native window at the end.
45 - (void)closePanel; 51 - (void)closePanel;
46 52
47 // Accessor for titlebar view. 53 // Accessor for titlebar view.
48 - (PanelTitlebarViewCocoa*)titlebarView; 54 - (PanelTitlebarViewCocoa*)titlebarView;
49 55
50 @end // @interface PanelWindowController 56 @end // @interface PanelWindowController
51 57
52 #endif // CHROME_BROWSER_UI_PANELS_PANEL_WINDOW_CONTROLLER_COCOA_H_ 58 #endif // CHROME_BROWSER_UI_PANELS_PANEL_WINDOW_CONTROLLER_COCOA_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698