| 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/view_resizer.h" | 19 #import "chrome/browser/cocoa/view_resizer.h" |
| 20 #import "third_party/GTM/AppKit/GTMTheme.h" | 20 #import "third_party/GTM/AppKit/GTMTheme.h" |
| 21 | 21 |
| 22 class Browser; | 22 class Browser; |
| 23 class BrowserWindow; | 23 class BrowserWindow; |
| 24 class BrowserWindowCocoa; | 24 class BrowserWindowCocoa; |
| 25 class ConstrainedWindowMac; |
| 25 @class DownloadShelfController; | 26 @class DownloadShelfController; |
| 26 @class FindBarCocoaController; | 27 @class FindBarCocoaController; |
| 28 @class GTMWindowSheetController; |
| 27 @class InfoBarContainerController; | 29 @class InfoBarContainerController; |
| 28 class LocationBar; | 30 class LocationBar; |
| 29 class StatusBubble; | 31 class StatusBubble; |
| 30 class TabContents; | 32 class TabContents; |
| 31 @class TabContentsController; | 33 @class TabContentsController; |
| 32 @class TabStripController; | 34 @class TabStripController; |
| 33 class TabStripModelObserverBridge; | 35 class TabStripModelObserverBridge; |
| 34 @class TabStripView; | 36 @class TabStripView; |
| 35 @class ToolbarController; | 37 @class ToolbarController; |
| 36 @class TitlebarController; | 38 @class TitlebarController; |
| (...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 130 - (void)userChangedTheme; | 132 - (void)userChangedTheme; |
| 131 | 133 |
| 132 // Executes the command in the context of the current browser. | 134 // Executes the command in the context of the current browser. |
| 133 // |command| is an integer value containing one of the constants defined in the | 135 // |command| is an integer value containing one of the constants defined in the |
| 134 // "chrome/app/chrome_dll_resource.h" file. | 136 // "chrome/app/chrome_dll_resource.h" file. |
| 135 - (void)executeCommand:(int)command; | 137 - (void)executeCommand:(int)command; |
| 136 | 138 |
| 137 // Delegate method for the status bubble to query about its vertical offset. | 139 // Delegate method for the status bubble to query about its vertical offset. |
| 138 - (float)verticalOffsetForStatusBubble; | 140 - (float)verticalOffsetForStatusBubble; |
| 139 | 141 |
| 142 // Returns the (lazily created) window sheet controller of this window. Used |
| 143 // for the per-tab sheets. |
| 144 - (GTMWindowSheetController*)sheetController; |
| 145 |
| 146 // Checks if there are any tabs with sheets open, and if so, raises one of |
| 147 // the tabs with a sheet and returns NO. |
| 148 - (BOOL)shouldCloseWithOpenPerTabSheets; |
| 149 |
| 150 - (void)attachConstrainedWindow:(ConstrainedWindowMac*)window; |
| 151 - (void)removeConstrainedWindow:(ConstrainedWindowMac*)window; |
| 152 |
| 140 @end | 153 @end |
| 141 | 154 |
| 142 | 155 |
| 143 @interface BrowserWindowController(TestingAPI) | 156 @interface BrowserWindowController(TestingAPI) |
| 144 | 157 |
| 145 // Put the incognito badge on the browser and adjust the tab strip | 158 // Put the incognito badge on the browser and adjust the tab strip |
| 146 // accordingly. | 159 // accordingly. |
| 147 - (void)installIncognitoBadge; | 160 - (void)installIncognitoBadge; |
| 148 | 161 |
| 149 // Allows us to initWithBrowser withOUT taking ownership of the browser. | 162 // Allows us to initWithBrowser withOUT taking ownership of the browser. |
| 150 - (id)initWithBrowser:(Browser*)browser takeOwnership:(BOOL)ownIt; | 163 - (id)initWithBrowser:(Browser*)browser takeOwnership:(BOOL)ownIt; |
| 151 | 164 |
| 152 // Return an autoreleased NSWindow suitable for fullscreen use. | 165 // Return an autoreleased NSWindow suitable for fullscreen use. |
| 153 - (NSWindow*)fullscreenWindow; | 166 - (NSWindow*)fullscreenWindow; |
| 154 | 167 |
| 155 @end // BrowserWindowController(TestingAPI) | 168 @end // BrowserWindowController(TestingAPI) |
| 156 | 169 |
| 157 #endif // CHROME_BROWSER_COCOA_BROWSER_WINDOW_CONTROLLER_H_ | 170 #endif // CHROME_BROWSER_COCOA_BROWSER_WINDOW_CONTROLLER_H_ |
| OLD | NEW |