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 |
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/mac/scoped_nsobject.h" | 15 #include "base/mac/scoped_nsobject.h" |
16 #include "base/memory/scoped_ptr.h" | 16 #include "base/memory/scoped_ptr.h" |
17 #include "chrome/browser/translate/chrome_translate_client.h" | 17 #include "chrome/browser/translate/chrome_translate_client.h" |
18 #include "chrome/browser/ui/tabs/tab_utils.h" | 18 #include "chrome/browser/ui/tabs/tab_utils.h" |
19 #import "chrome/browser/ui/cocoa/bookmarks/bookmark_bar_controller.h" | 19 #import "chrome/browser/ui/cocoa/bookmarks/bookmark_bar_controller.h" |
20 #import "chrome/browser/ui/cocoa/bookmarks/bookmark_bubble_controller.h" | 20 #import "chrome/browser/ui/cocoa/bookmarks/bookmark_bubble_controller.h" |
21 #import "chrome/browser/ui/cocoa/exclusive_access_bubble_window_controller.h" | |
22 #import "chrome/browser/ui/cocoa/tabs/tab_strip_controller.h" | 21 #import "chrome/browser/ui/cocoa/tabs/tab_strip_controller.h" |
23 #import "chrome/browser/ui/cocoa/tabs/tab_window_controller.h" | 22 #import "chrome/browser/ui/cocoa/tabs/tab_window_controller.h" |
24 #import "chrome/browser/ui/cocoa/themed_window.h" | 23 #import "chrome/browser/ui/cocoa/themed_window.h" |
25 #import "chrome/browser/ui/cocoa/url_drop_target.h" | 24 #import "chrome/browser/ui/cocoa/url_drop_target.h" |
26 #import "chrome/browser/ui/cocoa/view_resizer.h" | 25 #import "chrome/browser/ui/cocoa/view_resizer.h" |
| 26 #include "chrome/browser/ui/views/exclusive_access_bubble_views.h" |
27 #include "components/translate/core/common/translate_errors.h" | 27 #include "components/translate/core/common/translate_errors.h" |
28 #include "ui/base/accelerators/accelerator_manager.h" | 28 #include "ui/base/accelerators/accelerator_manager.h" |
29 #include "ui/gfx/geometry/rect.h" | 29 #include "ui/gfx/geometry/rect.h" |
30 | 30 |
31 @class AvatarBaseController; | 31 @class AvatarBaseController; |
32 class BookmarkBubbleObserverCocoa; | 32 class BookmarkBubbleObserverCocoa; |
33 class Browser; | 33 class Browser; |
34 class BrowserWindow; | 34 class BrowserWindow; |
35 class BrowserWindowCocoa; | 35 class BrowserWindowCocoa; |
36 @class BrowserWindowFullscreenTransition; | 36 @class BrowserWindowFullscreenTransition; |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
74 base::scoped_nsobject<ToolbarController> toolbarController_; | 74 base::scoped_nsobject<ToolbarController> toolbarController_; |
75 base::scoped_nsobject<TabStripController> tabStripController_; | 75 base::scoped_nsobject<TabStripController> tabStripController_; |
76 base::scoped_nsobject<FindBarCocoaController> findBarCocoaController_; | 76 base::scoped_nsobject<FindBarCocoaController> findBarCocoaController_; |
77 base::scoped_nsobject<InfoBarContainerController> infoBarContainerController_; | 77 base::scoped_nsobject<InfoBarContainerController> infoBarContainerController_; |
78 base::scoped_nsobject<DownloadShelfController> downloadShelfController_; | 78 base::scoped_nsobject<DownloadShelfController> downloadShelfController_; |
79 base::scoped_nsobject<BookmarkBarController> bookmarkBarController_; | 79 base::scoped_nsobject<BookmarkBarController> bookmarkBarController_; |
80 base::scoped_nsobject<DevToolsController> devToolsController_; | 80 base::scoped_nsobject<DevToolsController> devToolsController_; |
81 base::scoped_nsobject<OverlayableContentsController> | 81 base::scoped_nsobject<OverlayableContentsController> |
82 overlayableContentsController_; | 82 overlayableContentsController_; |
83 base::scoped_nsobject<PresentationModeController> presentationModeController_; | 83 base::scoped_nsobject<PresentationModeController> presentationModeController_; |
84 base::scoped_nsobject<ExclusiveAccessBubbleWindowController> | 84 scoped_ptr<ExclusiveAccessBubbleViews> exclusive_access_bubble_; |
85 exclusiveAccessBubbleWindowController_; | |
86 base::scoped_nsobject<BrowserWindowFullscreenTransition> | 85 base::scoped_nsobject<BrowserWindowFullscreenTransition> |
87 fullscreenTransition_; | 86 fullscreenTransition_; |
88 | 87 |
89 // Strong. StatusBubble is a special case of a strong reference that | 88 // Strong. StatusBubble is a special case of a strong reference that |
90 // we don't wrap in a scoped_ptr because it is acting the same | 89 // we don't wrap in a scoped_ptr because it is acting the same |
91 // as an NSWindowController in that it wraps a window that must | 90 // as an NSWindowController in that it wraps a window that must |
92 // be shut down before our destructors are called. | 91 // be shut down before our destructors are called. |
93 StatusBubbleMac* statusBubble_; | 92 StatusBubbleMac* statusBubble_; |
94 | 93 |
95 scoped_ptr<BookmarkBubbleObserverCocoa> bookmarkBubbleObserver_; | 94 scoped_ptr<BookmarkBubbleObserverCocoa> bookmarkBubbleObserver_; |
(...skipping 528 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
624 | 623 |
625 // Resets any saved state about window growth (due to showing the bookmark bar | 624 // Resets any saved state about window growth (due to showing the bookmark bar |
626 // or the download shelf), so that future shrinking will occur from the bottom. | 625 // or the download shelf), so that future shrinking will occur from the bottom. |
627 - (void)resetWindowGrowthState; | 626 - (void)resetWindowGrowthState; |
628 | 627 |
629 // Computes by how far in each direction, horizontal and vertical, the | 628 // Computes by how far in each direction, horizontal and vertical, the |
630 // |source| rect doesn't fit into |target|. | 629 // |source| rect doesn't fit into |target|. |
631 - (NSSize)overflowFrom:(NSRect)source | 630 - (NSSize)overflowFrom:(NSRect)source |
632 to:(NSRect)target; | 631 to:(NSRect)target; |
633 | 632 |
634 // The fullscreen exit bubble controller, or nil if the bubble isn't showing. | |
635 - (ExclusiveAccessBubbleWindowController*)exclusiveAccessBubbleWindowController; | |
636 | |
637 // Gets the rect, in window base coordinates, that the omnibox popup should be | 633 // Gets the rect, in window base coordinates, that the omnibox popup should be |
638 // positioned relative to. | 634 // positioned relative to. |
639 - (NSRect)omniboxPopupAnchorRect; | 635 - (NSRect)omniboxPopupAnchorRect; |
640 | 636 |
641 @end // @interface BrowserWindowController (TestingAPI) | 637 @end // @interface BrowserWindowController (TestingAPI) |
642 | 638 |
643 | 639 |
644 #endif // CHROME_BROWSER_UI_COCOA_BROWSER_WINDOW_CONTROLLER_H_ | 640 #endif // CHROME_BROWSER_UI_COCOA_BROWSER_WINDOW_CONTROLLER_H_ |
OLD | NEW |