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