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 | 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 |
11 // TabWindowController, a tab strip along the top. | 11 // TabWindowController, a tab strip along the top. |
12 | 12 |
13 #import <Cocoa/Cocoa.h> | 13 #import <Cocoa/Cocoa.h> |
14 | 14 |
15 #include "base/scoped_nsobject.h" | 15 #include "base/scoped_nsobject.h" |
16 #include "base/scoped_ptr.h" | 16 #include "base/scoped_ptr.h" |
17 #import "chrome/browser/cocoa/tab_window_controller.h" | 17 #import "chrome/browser/cocoa/tab_window_controller.h" |
18 #import "chrome/browser/cocoa/bookmark_bar_controller.h" | 18 #import "chrome/browser/cocoa/bookmark_bar_controller.h" |
19 #import "chrome/browser/cocoa/bookmark_bubble_controller.h" | 19 #import "chrome/browser/cocoa/bookmark_bubble_controller.h" |
| 20 #import "chrome/browser/cocoa/browser_command_executor.h" |
20 #import "chrome/browser/cocoa/view_resizer.h" | 21 #import "chrome/browser/cocoa/view_resizer.h" |
21 #import "third_party/GTM/AppKit/GTMTheme.h" | 22 #import "third_party/GTM/AppKit/GTMTheme.h" |
22 | 23 |
23 class Browser; | 24 class Browser; |
24 class BrowserWindow; | 25 class BrowserWindow; |
25 class BrowserWindowCocoa; | 26 class BrowserWindowCocoa; |
26 @class ChromeBrowserWindow; | 27 @class ChromeBrowserWindow; |
27 class ConstrainedWindowMac; | 28 class ConstrainedWindowMac; |
28 @class DownloadShelfController; | 29 @class DownloadShelfController; |
29 @class ExtensionShelfController; | 30 @class ExtensionShelfController; |
30 @class FindBarCocoaController; | 31 @class FindBarCocoaController; |
31 @class GTMWindowSheetController; | 32 @class GTMWindowSheetController; |
32 @class InfoBarContainerController; | 33 @class InfoBarContainerController; |
33 class LocationBar; | 34 class LocationBar; |
34 class StatusBubbleMac; | 35 class StatusBubbleMac; |
35 class TabContents; | 36 class TabContents; |
36 @class TabContentsController; | 37 @class TabContentsController; |
37 @class TabStripController; | 38 @class TabStripController; |
38 class TabStripModelObserverBridge; | 39 class TabStripModelObserverBridge; |
39 @class TabStripView; | 40 @class TabStripView; |
40 @class ToolbarController; | 41 @class ToolbarController; |
41 @class TitlebarController; | 42 @class TitlebarController; |
42 | 43 |
43 @interface BrowserWindowController : | 44 @interface BrowserWindowController : |
44 TabWindowController<NSUserInterfaceValidations, | 45 TabWindowController<NSUserInterfaceValidations, |
45 BookmarkURLOpener, | 46 BookmarkURLOpener, |
46 BookmarkBubbleControllerDelegate, | 47 BookmarkBubbleControllerDelegate, |
| 48 BrowserCommandExecutor, |
47 ViewResizer, | 49 ViewResizer, |
48 GTMThemeDelegate> { | 50 GTMThemeDelegate> { |
49 @private | 51 @private |
50 // The ordering of these members is important as it determines the order in | 52 // The ordering of these members is important as it determines the order in |
51 // which they are destroyed. |browser_| needs to be destroyed last as most of | 53 // which they are destroyed. |browser_| needs to be destroyed last as most of |
52 // the other objects hold weak references to it or things it owns | 54 // the other objects hold weak references to it or things it owns |
53 // (tab/toolbar/bookmark models, profiles, etc). | 55 // (tab/toolbar/bookmark models, profiles, etc). |
54 scoped_ptr<Browser> browser_; | 56 scoped_ptr<Browser> browser_; |
55 NSWindow* savedRegularWindow_; | 57 NSWindow* savedRegularWindow_; |
56 scoped_ptr<TabStripModelObserverBridge> tabObserver_; | 58 scoped_ptr<TabStripModelObserverBridge> tabObserver_; |
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
178 | 180 |
179 // Return an autoreleased NSWindow suitable for fullscreen use. | 181 // Return an autoreleased NSWindow suitable for fullscreen use. |
180 - (NSWindow*)fullscreenWindow; | 182 - (NSWindow*)fullscreenWindow; |
181 | 183 |
182 // Return a point suitable for the topLeft for a bookmark bubble. | 184 // Return a point suitable for the topLeft for a bookmark bubble. |
183 - (NSPoint)topLeftForBubble; | 185 - (NSPoint)topLeftForBubble; |
184 | 186 |
185 @end // BrowserWindowController(TestingAPI) | 187 @end // BrowserWindowController(TestingAPI) |
186 | 188 |
187 #endif // CHROME_BROWSER_COCOA_BROWSER_WINDOW_CONTROLLER_H_ | 189 #endif // CHROME_BROWSER_COCOA_BROWSER_WINDOW_CONTROLLER_H_ |
OLD | NEW |