| 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 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 58 @class TranslateBubbleController; | 58 @class TranslateBubbleController; |
| 59 | 59 |
| 60 namespace content { | 60 namespace content { |
| 61 class WebContents; | 61 class WebContents; |
| 62 } | 62 } |
| 63 | 63 |
| 64 namespace extensions { | 64 namespace extensions { |
| 65 class Command; | 65 class Command; |
| 66 } | 66 } |
| 67 | 67 |
| 68 namespace { | |
| 69 class OmniboxPopupModelObserverBridge; | |
| 70 } | |
| 71 | |
| 72 constexpr const gfx::Size kMinCocoaTabbedWindowSize(400, 272); | 68 constexpr const gfx::Size kMinCocoaTabbedWindowSize(400, 272); |
| 73 constexpr const gfx::Size kMinCocoaPopupWindowSize(100, 122); | 69 constexpr const gfx::Size kMinCocoaPopupWindowSize(100, 122); |
| 74 | 70 |
| 75 @interface BrowserWindowController | 71 @interface BrowserWindowController |
| 76 : TabWindowController<BookmarkBarControllerDelegate, | 72 : TabWindowController<BookmarkBarControllerDelegate, |
| 77 ViewResizer, | 73 ViewResizer, |
| 78 TabStripControllerDelegate> { | 74 TabStripControllerDelegate> { |
| 79 @private | 75 @private |
| 80 // The ordering of these members is important as it determines the order in | 76 // The ordering of these members is important as it determines the order in |
| 81 // which they are destroyed. |browser_| needs to be destroyed last as most of | 77 // which they are destroyed. |browser_| needs to be destroyed last as most of |
| (...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 194 BOOL blockLayoutSubviews_; | 190 BOOL blockLayoutSubviews_; |
| 195 | 191 |
| 196 // Set when AppKit invokes -windowWillClose: to protect against possible | 192 // Set when AppKit invokes -windowWillClose: to protect against possible |
| 197 // crashes. See http://crbug.com/671213. | 193 // crashes. See http://crbug.com/671213. |
| 198 BOOL didWindowWillClose_; | 194 BOOL didWindowWillClose_; |
| 199 | 195 |
| 200 // The Extension Command Registry used to determine which keyboard events to | 196 // The Extension Command Registry used to determine which keyboard events to |
| 201 // handle. | 197 // handle. |
| 202 std::unique_ptr<ExtensionKeybindingRegistryCocoa> | 198 std::unique_ptr<ExtensionKeybindingRegistryCocoa> |
| 203 extensionKeybindingRegistry_; | 199 extensionKeybindingRegistry_; |
| 204 | |
| 205 // Observes whether the omnibox popup is shown or hidden. | |
| 206 std::unique_ptr<OmniboxPopupModelObserverBridge> | |
| 207 omniboxPopupModelObserverBridge_; | |
| 208 } | 200 } |
| 209 | 201 |
| 210 // A convenience class method which gets the |BrowserWindowController| for a | 202 // A convenience class method which gets the |BrowserWindowController| for a |
| 211 // given window. This method returns nil if no window in the chain has a BWC. | 203 // given window. This method returns nil if no window in the chain has a BWC. |
| 212 + (BrowserWindowController*)browserWindowControllerForWindow:(NSWindow*)window; | 204 + (BrowserWindowController*)browserWindowControllerForWindow:(NSWindow*)window; |
| 213 | 205 |
| 214 // A convenience class method which gets the |BrowserWindowController| for a | 206 // A convenience class method which gets the |BrowserWindowController| for a |
| 215 // given view. This is the controller for the window containing |view|, if it | 207 // given view. This is the controller for the window containing |view|, if it |
| 216 // is a BWC, or the first controller in the parent-window chain that is a | 208 // is a BWC, or the first controller in the parent-window chain that is a |
| 217 // BWC. This method returns nil if no window in the chain has a BWC. | 209 // BWC. This method returns nil if no window in the chain has a BWC. |
| (...skipping 404 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 622 // Returns the fullscreen toolbar controller. | 614 // Returns the fullscreen toolbar controller. |
| 623 - (FullscreenToolbarController*)fullscreenToolbarController; | 615 - (FullscreenToolbarController*)fullscreenToolbarController; |
| 624 | 616 |
| 625 // Sets the fullscreen toolbar controller. | 617 // Sets the fullscreen toolbar controller. |
| 626 - (void)setFullscreenToolbarController:(FullscreenToolbarController*)controller; | 618 - (void)setFullscreenToolbarController:(FullscreenToolbarController*)controller; |
| 627 | 619 |
| 628 @end // @interface BrowserWindowController (TestingAPI) | 620 @end // @interface BrowserWindowController (TestingAPI) |
| 629 | 621 |
| 630 | 622 |
| 631 #endif // CHROME_BROWSER_UI_COCOA_BROWSER_WINDOW_CONTROLLER_H_ | 623 #endif // CHROME_BROWSER_UI_COCOA_BROWSER_WINDOW_CONTROLLER_H_ |
| OLD | NEW |