| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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_COCOA_BROWSER_WINDOW_CONTROLLER_H_ | 5 #ifndef CHROME_BROWSER_COCOA_BROWSER_WINDOW_CONTROLLER_H_ |
| 6 #define CHROME_BROWSER_COCOA_BROWSER_WINDOW_CONTROLLER_H_ | 6 #define CHROME_BROWSER_COCOA_BROWSER_WINDOW_CONTROLLER_H_ |
| 7 | 7 |
| 8 // A class acting as the Objective-C controller for the Browser object. Handles | 8 // A class acting as the Objective-C controller for the Browser object. Handles |
| 9 // interactions between Cocoa and the cross-platform code. | 9 // interactions between Cocoa and the cross-platform code. Each window has a |
| 10 // single set of toolbars (main toolbar, bookmark bar, etc) and, by virtue of |
| 11 // being a TabWindowController, a tab strip along the top. |
| 10 | 12 |
| 11 #import <Cocoa/Cocoa.h> | 13 #import <Cocoa/Cocoa.h> |
| 12 | 14 |
| 15 #include "base/scoped_nsobject.h" |
| 16 #include "base/scoped_ptr.h" |
| 13 #import "chrome/browser/cocoa/tab_window_controller.h" | 17 #import "chrome/browser/cocoa/tab_window_controller.h" |
| 14 #import "chrome/browser/cocoa/toolbar_view.h" | 18 #import "chrome/browser/cocoa/toolbar_view.h" |
| 15 | 19 |
| 16 class Browser; | 20 class Browser; |
| 17 class BrowserWindow; | 21 class BrowserWindow; |
| 18 class BrowserWindowCocoa; | 22 class BrowserWindowCocoa; |
| 19 class LocationBar; | 23 class LocationBar; |
| 20 class TabContents; | 24 class TabContents; |
| 21 @class TabContentsController; | 25 @class TabContentsController; |
| 22 @class TabStripController; | 26 @class TabStripController; |
| 23 class TabStripModelObserverBridge; | 27 class TabStripModelObserverBridge; |
| 24 @class TabStripView; | 28 @class TabStripView; |
| 25 @class ToolbarController; | 29 @class ToolbarController; |
| 26 | 30 |
| 27 @interface BrowserWindowController : | 31 @interface BrowserWindowController : |
| 28 TabWindowController<NSUserInterfaceValidations> { | 32 TabWindowController<NSUserInterfaceValidations> { |
| 29 @private | 33 @private |
| 30 TabStripController* tabStripController_; | 34 scoped_nsobject<TabStripController> tabStripController_; |
| 31 ToolbarController* toolbarController_; | 35 scoped_nsobject<ToolbarController> toolbarController_; |
| 32 Browser* browser_; | 36 scoped_ptr<Browser> browser_; |
| 33 TabStripModelObserverBridge* tabObserver_; | 37 scoped_ptr<TabStripModelObserverBridge> tabObserver_; |
| 34 BrowserWindowCocoa* windowShim_; | 38 scoped_ptr<BrowserWindowCocoa> windowShim_; |
| 35 } | 39 } |
| 36 | 40 |
| 37 // Load the browser window nib and do any Cocoa-specific initialization. | 41 // Load the browser window nib and do any Cocoa-specific initialization. |
| 38 // Takes ownership of |browser|. | 42 // Takes ownership of |browser|. |
| 39 - (id)initWithBrowser:(Browser*)browser; | 43 - (id)initWithBrowser:(Browser*)browser; |
| 40 | 44 |
| 41 // call to make the browser go away from other places in the cross-platform | 45 // call to make the browser go away from other places in the cross-platform |
| 42 // code. | 46 // code. |
| 43 - (void)destroyBrowser; | 47 - (void)destroyBrowser; |
| 44 | 48 |
| (...skipping 26 matching lines...) Expand all Loading... |
| 71 // Make the location bar the first responder, if possible. | 75 // Make the location bar the first responder, if possible. |
| 72 - (void)focusLocationBar; | 76 - (void)focusLocationBar; |
| 73 | 77 |
| 74 - (BOOL)isBookmarkBarVisible; | 78 - (BOOL)isBookmarkBarVisible; |
| 75 | 79 |
| 76 - (void)toggleBookmarkBar; | 80 - (void)toggleBookmarkBar; |
| 77 | 81 |
| 78 @end | 82 @end |
| 79 | 83 |
| 80 #endif // CHROME_BROWSER_COCOA_BROWSER_WINDOW_CONTROLLER_H_ | 84 #endif // CHROME_BROWSER_COCOA_BROWSER_WINDOW_CONTROLLER_H_ |
| OLD | NEW |