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

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

Issue 7003063: Enforce different min size for popups than tabbed browsers on MacOSX. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Use setMinSize instead of setContentMinSize. Created 9 years, 6 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_COCOA_BROWSER_WINDOW_CONTROLLER_H_ 5 #ifndef CHROME_BROWSER_UI_COCOA_BROWSER_WINDOW_CONTROLLER_H_
6 #define CHROME_BROWSER_UI_COCOA_BROWSER_WINDOW_CONTROLLER_H_ 6 #define CHROME_BROWSER_UI_COCOA_BROWSER_WINDOW_CONTROLLER_H_
7 #pragma once 7 #pragma once
8 8
9 // A class acting as the Objective-C controller for the Browser 9 // A class acting as the Objective-C controller for the Browser
10 // object. Handles interactions between Cocoa and the cross-platform 10 // object. Handles interactions between Cocoa and the cross-platform
11 // code. Each window has a single toolbar and, by virtue of being a 11 // code. Each window has a single toolbar and, by virtue of being a
12 // TabWindowController, a tab strip along the top. 12 // TabWindowController, a tab strip along the top.
13 13
14 #import <Cocoa/Cocoa.h> 14 #import <Cocoa/Cocoa.h>
15 15
16 #include "base/memory/scoped_nsobject.h" 16 #include "base/memory/scoped_nsobject.h"
17 #include "base/memory/scoped_ptr.h" 17 #include "base/memory/scoped_ptr.h"
18 #include "chrome/browser/sync/sync_ui_util.h" 18 #include "chrome/browser/sync/sync_ui_util.h"
19 #import "chrome/browser/ui/cocoa/bookmarks/bookmark_bar_controller.h" 19 #import "chrome/browser/ui/cocoa/bookmarks/bookmark_bar_controller.h"
20 #import "chrome/browser/ui/cocoa/bookmarks/bookmark_bubble_controller.h" 20 #import "chrome/browser/ui/cocoa/bookmarks/bookmark_bubble_controller.h"
21 #import "chrome/browser/ui/cocoa/browser_command_executor.h" 21 #import "chrome/browser/ui/cocoa/browser_command_executor.h"
22 #import "chrome/browser/ui/cocoa/tab_contents/tab_contents_controller.h" 22 #import "chrome/browser/ui/cocoa/tab_contents/tab_contents_controller.h"
23 #import "chrome/browser/ui/cocoa/tabs/tab_strip_controller.h" 23 #import "chrome/browser/ui/cocoa/tabs/tab_strip_controller.h"
24 #import "chrome/browser/ui/cocoa/tabs/tab_window_controller.h" 24 #import "chrome/browser/ui/cocoa/tabs/tab_window_controller.h"
25 #import "chrome/browser/ui/cocoa/themed_window.h" 25 #import "chrome/browser/ui/cocoa/themed_window.h"
26 #import "chrome/browser/ui/cocoa/url_drop_target.h" 26 #import "chrome/browser/ui/cocoa/url_drop_target.h"
27 #import "chrome/browser/ui/cocoa/view_resizer.h" 27 #import "chrome/browser/ui/cocoa/view_resizer.h"
28 #include "ui/gfx/rect.h"
28 29
29 30
30 class Browser; 31 class Browser;
31 class BrowserWindow; 32 class BrowserWindow;
32 class BrowserWindowCocoa; 33 class BrowserWindowCocoa;
33 class ConstrainedWindowMac; 34 class ConstrainedWindowMac;
34 @class DevToolsController; 35 @class DevToolsController;
35 @class DownloadShelfController; 36 @class DownloadShelfController;
36 @class FindBarCocoaController; 37 @class FindBarCocoaController;
37 @class FullscreenController; 38 @class FullscreenController;
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
136 // A convenience class method which gets the |BrowserWindowController| for a 137 // A convenience class method which gets the |BrowserWindowController| for a
137 // given view. This is the controller for the window containing |view|, if it 138 // given view. This is the controller for the window containing |view|, if it
138 // is a BWC, or the first controller in the parent-window chain that is a 139 // is a BWC, or the first controller in the parent-window chain that is a
139 // BWC. This method returns nil if no window in the chain has a BWC. 140 // BWC. This method returns nil if no window in the chain has a BWC.
140 + (BrowserWindowController*)browserWindowControllerForView:(NSView*)view; 141 + (BrowserWindowController*)browserWindowControllerForView:(NSView*)view;
141 142
142 // Load the browser window nib and do any Cocoa-specific initialization. 143 // Load the browser window nib and do any Cocoa-specific initialization.
143 // Takes ownership of |browser|. 144 // Takes ownership of |browser|.
144 - (id)initWithBrowser:(Browser*)browser; 145 - (id)initWithBrowser:(Browser*)browser;
145 146
147 // Set minimum size on window depending on browser type.
148 - (void)awakeFromNib;
Nico 2011/06/09 16:54:35 awakeFromNib is usually not declared in .h files
jennb 2011/06/09 17:54:51 Removed. Good to know. Thx.
149
146 // Call to make the browser go away from other places in the cross-platform 150 // Call to make the browser go away from other places in the cross-platform
147 // code. 151 // code.
148 - (void)destroyBrowser; 152 - (void)destroyBrowser;
149 153
154 // Ensure bounds for the window abide by the minimum window size.
155 - (gfx::Rect)enforceMinWindowSize:(gfx::Rect)bounds;
156
150 // Access the C++ bridge between the NSWindow and the rest of Chromium. 157 // Access the C++ bridge between the NSWindow and the rest of Chromium.
151 - (BrowserWindow*)browserWindow; 158 - (BrowserWindow*)browserWindow;
152 159
153 // Return a weak pointer to the toolbar controller. 160 // Return a weak pointer to the toolbar controller.
154 - (ToolbarController*)toolbarController; 161 - (ToolbarController*)toolbarController;
155 162
156 // Return a weak pointer to the tab strip controller. 163 // Return a weak pointer to the tab strip controller.
157 - (TabStripController*)tabStripController; 164 - (TabStripController*)tabStripController;
158 165
159 // Access the ObjC controller that contains the infobars. 166 // Access the ObjC controller that contains the infobars.
(...skipping 235 matching lines...) Expand 10 before | Expand all | Expand 10 after
395 - (void)resetWindowGrowthState; 402 - (void)resetWindowGrowthState;
396 403
397 // Computes by how far in each direction, horizontal and vertical, the 404 // Computes by how far in each direction, horizontal and vertical, the
398 // |source| rect doesn't fit into |target|. 405 // |source| rect doesn't fit into |target|.
399 - (NSSize)overflowFrom:(NSRect)source 406 - (NSSize)overflowFrom:(NSRect)source
400 to:(NSRect)target; 407 to:(NSRect)target;
401 @end // @interface BrowserWindowController(TestingAPI) 408 @end // @interface BrowserWindowController(TestingAPI)
402 409
403 410
404 #endif // CHROME_BROWSER_UI_COCOA_BROWSER_WINDOW_CONTROLLER_H_ 411 #endif // CHROME_BROWSER_UI_COCOA_BROWSER_WINDOW_CONTROLLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698