OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 | 7 |
8 // A class acting as the Objective-C controller for the Browser | 8 // A class acting as the Objective-C controller for the Browser |
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 toolbar and, by virtue of being a | 10 // code. Each window has a single toolbar and, by virtue of being a |
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
188 // A convenience class method which gets the |BrowserWindowController| for a | 188 // A convenience class method which gets the |BrowserWindowController| for a |
189 // given window. This method returns nil if no window in the chain has a BWC. | 189 // given window. This method returns nil if no window in the chain has a BWC. |
190 + (BrowserWindowController*)browserWindowControllerForWindow:(NSWindow*)window; | 190 + (BrowserWindowController*)browserWindowControllerForWindow:(NSWindow*)window; |
191 | 191 |
192 // A convenience class method which gets the |BrowserWindowController| for a | 192 // A convenience class method which gets the |BrowserWindowController| for a |
193 // given view. This is the controller for the window containing |view|, if it | 193 // given view. This is the controller for the window containing |view|, if it |
194 // is a BWC, or the first controller in the parent-window chain that is a | 194 // is a BWC, or the first controller in the parent-window chain that is a |
195 // BWC. This method returns nil if no window in the chain has a BWC. | 195 // BWC. This method returns nil if no window in the chain has a BWC. |
196 + (BrowserWindowController*)browserWindowControllerForView:(NSView*)view; | 196 + (BrowserWindowController*)browserWindowControllerForView:(NSView*)view; |
197 | 197 |
198 // Helper method used to update the "Signin" menu item to reflect the current | |
199 // signed in state. Class-level function as it's still required even when there | |
200 // are no open browser windows. | |
201 + (void)updateSigninItem:(id)signinItem | |
202 shouldShow:(BOOL)showSigninMenuItem | |
203 currentProfile:(Profile*)profile; | |
204 | |
205 // Load the browser window nib and do any Cocoa-specific initialization. | 198 // Load the browser window nib and do any Cocoa-specific initialization. |
206 // Takes ownership of |browser|. | 199 // Takes ownership of |browser|. |
207 - (id)initWithBrowser:(Browser*)browser; | 200 - (id)initWithBrowser:(Browser*)browser; |
208 | 201 |
209 // Call to make the browser go away from other places in the cross-platform | 202 // Call to make the browser go away from other places in the cross-platform |
210 // code. | 203 // code. |
211 - (void)destroyBrowser; | 204 - (void)destroyBrowser; |
212 | 205 |
213 // Ensure bounds for the window abide by the minimum window size. | 206 // Ensure bounds for the window abide by the minimum window size. |
214 - (gfx::Rect)enforceMinWindowSize:(gfx::Rect)bounds; | 207 - (gfx::Rect)enforceMinWindowSize:(gfx::Rect)bounds; |
(...skipping 392 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
607 - (ExclusiveAccessBubbleWindowController*)exclusiveAccessBubbleWindowController; | 600 - (ExclusiveAccessBubbleWindowController*)exclusiveAccessBubbleWindowController; |
608 | 601 |
609 // Gets the rect, in window base coordinates, that the omnibox popup should be | 602 // Gets the rect, in window base coordinates, that the omnibox popup should be |
610 // positioned relative to. | 603 // positioned relative to. |
611 - (NSRect)omniboxPopupAnchorRect; | 604 - (NSRect)omniboxPopupAnchorRect; |
612 | 605 |
613 @end // @interface BrowserWindowController (TestingAPI) | 606 @end // @interface BrowserWindowController (TestingAPI) |
614 | 607 |
615 | 608 |
616 #endif // CHROME_BROWSER_UI_COCOA_BROWSER_WINDOW_CONTROLLER_H_ | 609 #endif // CHROME_BROWSER_UI_COCOA_BROWSER_WINDOW_CONTROLLER_H_ |
OLD | NEW |