OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 | 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 26 matching lines...) Expand all Loading... |
37 @class DownloadShelfController; | 37 @class DownloadShelfController; |
38 class ExtensionKeybindingRegistryCocoa; | 38 class ExtensionKeybindingRegistryCocoa; |
39 @class FindBarCocoaController; | 39 @class FindBarCocoaController; |
40 @class FullscreenModeController; | 40 @class FullscreenModeController; |
41 @class FullscreenWindow; | 41 @class FullscreenWindow; |
42 @class InfoBarContainerController; | 42 @class InfoBarContainerController; |
43 class LocationBarViewMac; | 43 class LocationBarViewMac; |
44 @class OverlayableContentsController; | 44 @class OverlayableContentsController; |
45 class PermissionBubbleCocoa; | 45 class PermissionBubbleCocoa; |
46 @class PresentationModeController; | 46 @class PresentationModeController; |
| 47 @class SidebarController; |
47 class StatusBubbleMac; | 48 class StatusBubbleMac; |
48 @class TabStripController; | 49 @class TabStripController; |
49 @class TabStripView; | 50 @class TabStripView; |
50 @class ToolbarController; | 51 @class ToolbarController; |
51 @class TranslateBubbleController; | 52 @class TranslateBubbleController; |
52 | 53 |
53 namespace content { | 54 namespace content { |
54 class WebContents; | 55 class WebContents; |
55 } | 56 } |
56 | 57 |
(...skipping 23 matching lines...) Expand all Loading... |
80 base::scoped_nsobject<BookmarkBarController> bookmarkBarController_; | 81 base::scoped_nsobject<BookmarkBarController> bookmarkBarController_; |
81 base::scoped_nsobject<DevToolsController> devToolsController_; | 82 base::scoped_nsobject<DevToolsController> devToolsController_; |
82 base::scoped_nsobject<OverlayableContentsController> | 83 base::scoped_nsobject<OverlayableContentsController> |
83 overlayableContentsController_; | 84 overlayableContentsController_; |
84 base::scoped_nsobject<PresentationModeController> presentationModeController_; | 85 base::scoped_nsobject<PresentationModeController> presentationModeController_; |
85 base::scoped_nsobject<ExclusiveAccessBubbleWindowController> | 86 base::scoped_nsobject<ExclusiveAccessBubbleWindowController> |
86 exclusiveAccessBubbleWindowController_; | 87 exclusiveAccessBubbleWindowController_; |
87 base::scoped_nsobject<BrowserWindowEnterFullscreenTransition> | 88 base::scoped_nsobject<BrowserWindowEnterFullscreenTransition> |
88 enterFullscreenTransition_; | 89 enterFullscreenTransition_; |
89 | 90 |
| 91 base::scoped_nsobject<SidebarController> sidebarController_; |
| 92 |
90 // Strong. StatusBubble is a special case of a strong reference that | 93 // Strong. StatusBubble is a special case of a strong reference that |
91 // we don't wrap in a scoped_ptr because it is acting the same | 94 // we don't wrap in a scoped_ptr because it is acting the same |
92 // as an NSWindowController in that it wraps a window that must | 95 // as an NSWindowController in that it wraps a window that must |
93 // be shut down before our destructors are called. | 96 // be shut down before our destructors are called. |
94 StatusBubbleMac* statusBubble_; | 97 StatusBubbleMac* statusBubble_; |
95 | 98 |
96 BookmarkBubbleController* bookmarkBubbleController_; // Weak. | 99 BookmarkBubbleController* bookmarkBubbleController_; // Weak. |
97 BOOL initializing_; // YES while we are currently in initWithBrowser: | 100 BOOL initializing_; // YES while we are currently in initWithBrowser: |
98 BOOL ownsBrowser_; // Only ever NO when testing | 101 BOOL ownsBrowser_; // Only ever NO when testing |
99 | 102 |
(...skipping 238 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
338 | 341 |
339 // Show the translate bubble. | 342 // Show the translate bubble. |
340 - (void)showTranslateBubbleForWebContents:(content::WebContents*)contents | 343 - (void)showTranslateBubbleForWebContents:(content::WebContents*)contents |
341 step:(translate::TranslateStep)step | 344 step:(translate::TranslateStep)step |
342 errorType: | 345 errorType: |
343 (translate::TranslateErrors::Type)errorType; | 346 (translate::TranslateErrors::Type)errorType; |
344 | 347 |
345 // Shows or hides the docked web inspector depending on |contents|'s state. | 348 // Shows or hides the docked web inspector depending on |contents|'s state. |
346 - (void)updateDevToolsForContents:(content::WebContents*)contents; | 349 - (void)updateDevToolsForContents:(content::WebContents*)contents; |
347 | 350 |
| 351 // Displays the active sidebar linked to the |contents| or hides sidebar UI, |
| 352 // if there's no such sidebar. |
| 353 - (void)updateSidebarForContents:(content::WebContents*)contents; |
| 354 |
348 // Gets the current theme provider. | 355 // Gets the current theme provider. |
349 - (ui::ThemeProvider*)themeProvider; | 356 - (ui::ThemeProvider*)themeProvider; |
350 | 357 |
351 // Gets the window style. | 358 // Gets the window style. |
352 - (ThemedWindowStyle)themedWindowStyle; | 359 - (ThemedWindowStyle)themedWindowStyle; |
353 | 360 |
354 // Returns the position in window coordinates that the top left of a theme | 361 // Returns the position in window coordinates that the top left of a theme |
355 // image with |alignment| should be painted at. If the window does not have a | 362 // image with |alignment| should be painted at. If the window does not have a |
356 // tab strip, the offset for THEME_IMAGE_ALIGN_WITH_FRAME is always returned. | 363 // tab strip, the offset for THEME_IMAGE_ALIGN_WITH_FRAME is always returned. |
357 // The result of this method can be used in conjunction with | 364 // The result of this method can be used in conjunction with |
(...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
605 - (ExclusiveAccessBubbleWindowController*)exclusiveAccessBubbleWindowController; | 612 - (ExclusiveAccessBubbleWindowController*)exclusiveAccessBubbleWindowController; |
606 | 613 |
607 // Gets the rect, in window base coordinates, that the omnibox popup should be | 614 // Gets the rect, in window base coordinates, that the omnibox popup should be |
608 // positioned relative to. | 615 // positioned relative to. |
609 - (NSRect)omniboxPopupAnchorRect; | 616 - (NSRect)omniboxPopupAnchorRect; |
610 | 617 |
611 @end // @interface BrowserWindowController (TestingAPI) | 618 @end // @interface BrowserWindowController (TestingAPI) |
612 | 619 |
613 | 620 |
614 #endif // CHROME_BROWSER_UI_COCOA_BROWSER_WINDOW_CONTROLLER_H_ | 621 #endif // CHROME_BROWSER_UI_COCOA_BROWSER_WINDOW_CONTROLLER_H_ |
OLD | NEW |