OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #pragma once | 7 #pragma once |
8 | 8 |
9 // A class acting as the Objective-C controller for the Browser | 9 // A class acting as the Objective-C controller for the Browser |
10 // object. Handles interactions between Cocoa and the cross-platform | 10 // object. Handles interactions between Cocoa and the cross-platform |
(...skipping 24 matching lines...) Expand all Loading... |
35 class ConstrainedWindowMac; | 35 class ConstrainedWindowMac; |
36 @class DevToolsController; | 36 @class DevToolsController; |
37 @class DownloadShelfController; | 37 @class DownloadShelfController; |
38 @class FindBarCocoaController; | 38 @class FindBarCocoaController; |
39 @class FullscreenWindow; | 39 @class FullscreenWindow; |
40 @class GTMWindowSheetController; | 40 @class GTMWindowSheetController; |
41 @class InfoBarContainerController; | 41 @class InfoBarContainerController; |
42 class LocationBarViewMac; | 42 class LocationBarViewMac; |
43 @class PresentationModeController; | 43 @class PresentationModeController; |
44 @class PreviewableContentsController; | 44 @class PreviewableContentsController; |
45 @class SidebarController; | |
46 class StatusBubbleMac; | 45 class StatusBubbleMac; |
47 class TabContents; | 46 class TabContents; |
48 @class TabStripController; | 47 @class TabStripController; |
49 @class TabStripView; | 48 @class TabStripView; |
50 @class ToolbarController; | 49 @class ToolbarController; |
51 | 50 |
52 @interface BrowserWindowController : | 51 @interface BrowserWindowController : |
53 TabWindowController<NSUserInterfaceValidations, | 52 TabWindowController<NSUserInterfaceValidations, |
54 BookmarkBarControllerDelegate, | 53 BookmarkBarControllerDelegate, |
55 BrowserCommandExecutor, | 54 BrowserCommandExecutor, |
56 ViewResizer, | 55 ViewResizer, |
57 TabContentsControllerDelegate, | 56 TabContentsControllerDelegate, |
58 TabStripControllerDelegate> { | 57 TabStripControllerDelegate> { |
59 @private | 58 @private |
60 // The ordering of these members is important as it determines the order in | 59 // The ordering of these members is important as it determines the order in |
61 // which they are destroyed. |browser_| needs to be destroyed last as most of | 60 // which they are destroyed. |browser_| needs to be destroyed last as most of |
62 // the other objects hold weak references to it or things it owns | 61 // the other objects hold weak references to it or things it owns |
63 // (tab/toolbar/bookmark models, profiles, etc). | 62 // (tab/toolbar/bookmark models, profiles, etc). |
64 scoped_ptr<Browser> browser_; | 63 scoped_ptr<Browser> browser_; |
65 NSWindow* savedRegularWindow_; | 64 NSWindow* savedRegularWindow_; |
66 scoped_ptr<BrowserWindowCocoa> windowShim_; | 65 scoped_ptr<BrowserWindowCocoa> windowShim_; |
67 scoped_nsobject<ToolbarController> toolbarController_; | 66 scoped_nsobject<ToolbarController> toolbarController_; |
68 scoped_nsobject<TabStripController> tabStripController_; | 67 scoped_nsobject<TabStripController> tabStripController_; |
69 scoped_nsobject<FindBarCocoaController> findBarCocoaController_; | 68 scoped_nsobject<FindBarCocoaController> findBarCocoaController_; |
70 scoped_nsobject<InfoBarContainerController> infoBarContainerController_; | 69 scoped_nsobject<InfoBarContainerController> infoBarContainerController_; |
71 scoped_nsobject<DownloadShelfController> downloadShelfController_; | 70 scoped_nsobject<DownloadShelfController> downloadShelfController_; |
72 scoped_nsobject<BookmarkBarController> bookmarkBarController_; | 71 scoped_nsobject<BookmarkBarController> bookmarkBarController_; |
73 scoped_nsobject<DevToolsController> devToolsController_; | 72 scoped_nsobject<DevToolsController> devToolsController_; |
74 scoped_nsobject<SidebarController> sidebarController_; | |
75 scoped_nsobject<PreviewableContentsController> previewableContentsController_; | 73 scoped_nsobject<PreviewableContentsController> previewableContentsController_; |
76 scoped_nsobject<PresentationModeController> presentationModeController_; | 74 scoped_nsobject<PresentationModeController> presentationModeController_; |
77 scoped_nsobject<FullscreenExitBubbleController> | 75 scoped_nsobject<FullscreenExitBubbleController> |
78 fullscreenExitBubbleController_; | 76 fullscreenExitBubbleController_; |
79 | 77 |
80 // Strong. StatusBubble is a special case of a strong reference that | 78 // Strong. StatusBubble is a special case of a strong reference that |
81 // we don't wrap in a scoped_ptr because it is acting the same | 79 // we don't wrap in a scoped_ptr because it is acting the same |
82 // as an NSWindowController in that it wraps a window that must | 80 // as an NSWindowController in that it wraps a window that must |
83 // be shut down before our destructors are called. | 81 // be shut down before our destructors are called. |
84 StatusBubbleMac* statusBubble_; | 82 StatusBubbleMac* statusBubble_; |
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
281 - (void)attachConstrainedWindow:(ConstrainedWindowMac*)window; | 279 - (void)attachConstrainedWindow:(ConstrainedWindowMac*)window; |
282 // Closes the tab sheet |window| and potentially shows the next sheet in the | 280 // Closes the tab sheet |window| and potentially shows the next sheet in the |
283 // tab's sheet queue. | 281 // tab's sheet queue. |
284 - (void)removeConstrainedWindow:(ConstrainedWindowMac*)window; | 282 - (void)removeConstrainedWindow:(ConstrainedWindowMac*)window; |
285 // Returns NO if constrained windows cannot be attached to this window. | 283 // Returns NO if constrained windows cannot be attached to this window. |
286 - (BOOL)canAttachConstrainedWindow; | 284 - (BOOL)canAttachConstrainedWindow; |
287 | 285 |
288 // Shows or hides the docked web inspector depending on |contents|'s state. | 286 // Shows or hides the docked web inspector depending on |contents|'s state. |
289 - (void)updateDevToolsForContents:(TabContents*)contents; | 287 - (void)updateDevToolsForContents:(TabContents*)contents; |
290 | 288 |
291 // Displays the active sidebar linked to the |contents| or hides sidebar UI, | |
292 // if there's no such sidebar. | |
293 - (void)updateSidebarForContents:(TabContents*)contents; | |
294 | |
295 // Gets the current theme provider. | 289 // Gets the current theme provider. |
296 - (ui::ThemeProvider*)themeProvider; | 290 - (ui::ThemeProvider*)themeProvider; |
297 | 291 |
298 // Gets the window style. | 292 // Gets the window style. |
299 - (ThemedWindowStyle)themedWindowStyle; | 293 - (ThemedWindowStyle)themedWindowStyle; |
300 | 294 |
301 // Gets the pattern phase for the window. | 295 // Gets the pattern phase for the window. |
302 - (NSPoint)themePatternPhase; | 296 - (NSPoint)themePatternPhase; |
303 | 297 |
304 // Return the point to which a bubble window's arrow should point. | 298 // Return the point to which a bubble window's arrow should point. |
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
464 // |source| rect doesn't fit into |target|. | 458 // |source| rect doesn't fit into |target|. |
465 - (NSSize)overflowFrom:(NSRect)source | 459 - (NSSize)overflowFrom:(NSRect)source |
466 to:(NSRect)target; | 460 to:(NSRect)target; |
467 | 461 |
468 // The fullscreen exit bubble controller, or nil if the bubble isn't showing. | 462 // The fullscreen exit bubble controller, or nil if the bubble isn't showing. |
469 - (FullscreenExitBubbleController*)fullscreenExitBubbleController; | 463 - (FullscreenExitBubbleController*)fullscreenExitBubbleController; |
470 @end // @interface BrowserWindowController (TestingAPI) | 464 @end // @interface BrowserWindowController (TestingAPI) |
471 | 465 |
472 | 466 |
473 #endif // CHROME_BROWSER_UI_COCOA_BROWSER_WINDOW_CONTROLLER_H_ | 467 #endif // CHROME_BROWSER_UI_COCOA_BROWSER_WINDOW_CONTROLLER_H_ |
OLD | NEW |