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 |
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
153 - (float)verticalOffsetForStatusBubble; | 153 - (float)verticalOffsetForStatusBubble; |
154 | 154 |
155 // Show the bookmark bubble (e.g. user just clicked on the STAR) | 155 // Show the bookmark bubble (e.g. user just clicked on the STAR) |
156 - (void)showBookmarkBubbleForURL:(const GURL&)url | 156 - (void)showBookmarkBubbleForURL:(const GURL&)url |
157 alreadyBookmarked:(BOOL)alreadyBookmarked; | 157 alreadyBookmarked:(BOOL)alreadyBookmarked; |
158 | 158 |
159 // Returns the (lazily created) window sheet controller of this window. Used | 159 // Returns the (lazily created) window sheet controller of this window. Used |
160 // for the per-tab sheets. | 160 // for the per-tab sheets. |
161 - (GTMWindowSheetController*)sheetController; | 161 - (GTMWindowSheetController*)sheetController; |
162 | 162 |
163 - (void)attachConstrainedWindow:(ConstrainedWindowMac*)window; | 163 // Requests that |window| is opened as a per-tab sheet to the current tab. |
| 164 // Returns YES if the window became the active per-tab sheet of the current tab, |
| 165 // or NO if the current tab already has a per-tab sheet. If this returns NO, |
| 166 // the window's |Realize()| method will be called again when the curren sheet |
| 167 // disappears. The window should then call |attachConstrainedWindow:| again. |
| 168 - (BOOL)attachConstrainedWindow:(ConstrainedWindowMac*)window; |
| 169 |
| 170 // Closes the tab sheet |window| and potentially shows the next sheet in the |
| 171 // tab's sheet queue. |
164 - (void)removeConstrainedWindow:(ConstrainedWindowMac*)window; | 172 - (void)removeConstrainedWindow:(ConstrainedWindowMac*)window; |
165 | 173 |
166 // Delegate method called when window is resized. | 174 // Delegate method called when window is resized. |
167 - (void)windowDidResize:(NSNotification*)notification; | 175 - (void)windowDidResize:(NSNotification*)notification; |
168 | 176 |
169 @end | 177 @end |
170 | 178 |
171 | 179 |
172 @interface BrowserWindowController(TestingAPI) | 180 @interface BrowserWindowController(TestingAPI) |
173 | 181 |
(...skipping 12 matching lines...) Expand all Loading... |
186 | 194 |
187 // Updates a bookmark sync UI item (expected to be a menu item). This is | 195 // Updates a bookmark sync UI item (expected to be a menu item). This is |
188 // called every time the menu containing the sync UI item is displayed. | 196 // called every time the menu containing the sync UI item is displayed. |
189 - (void)updateSyncItem:(id)syncItem | 197 - (void)updateSyncItem:(id)syncItem |
190 syncEnabled:(BOOL)syncEnabled | 198 syncEnabled:(BOOL)syncEnabled |
191 status:(SyncStatusUIHelper::MessageType)status; | 199 status:(SyncStatusUIHelper::MessageType)status; |
192 | 200 |
193 @end // BrowserWindowController(TestingAPI) | 201 @end // BrowserWindowController(TestingAPI) |
194 | 202 |
195 #endif // CHROME_BROWSER_COCOA_BROWSER_WINDOW_CONTROLLER_H_ | 203 #endif // CHROME_BROWSER_COCOA_BROWSER_WINDOW_CONTROLLER_H_ |
OLD | NEW |