| 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 |
| 11 // code. Each window has a single toolbar and, by virtue of being a | 11 // code. Each window has a single toolbar and, by virtue of being a |
| 12 // TabWindowController, a tab strip along the top. | 12 // TabWindowController, a tab strip along the top. |
| 13 | 13 |
| 14 #import <Cocoa/Cocoa.h> | 14 #import <Cocoa/Cocoa.h> |
| 15 | 15 |
| 16 #include "base/memory/scoped_nsobject.h" | 16 #include "base/memory/scoped_nsobject.h" |
| 17 #include "base/memory/scoped_ptr.h" | 17 #include "base/memory/scoped_ptr.h" |
| 18 #include "chrome/browser/sync/sync_ui_util.h" | 18 #include "chrome/browser/sync/sync_ui_util.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/browser_command_executor.h" | 21 #import "chrome/browser/ui/cocoa/browser_command_executor.h" |
| 22 #import "chrome/browser/ui/cocoa/fullscreen_exit_bubble_controller.h" |
| 22 #import "chrome/browser/ui/cocoa/tab_contents/tab_contents_controller.h" | 23 #import "chrome/browser/ui/cocoa/tab_contents/tab_contents_controller.h" |
| 23 #import "chrome/browser/ui/cocoa/tabs/tab_strip_controller.h" | 24 #import "chrome/browser/ui/cocoa/tabs/tab_strip_controller.h" |
| 24 #import "chrome/browser/ui/cocoa/tabs/tab_window_controller.h" | 25 #import "chrome/browser/ui/cocoa/tabs/tab_window_controller.h" |
| 25 #import "chrome/browser/ui/cocoa/themed_window.h" | 26 #import "chrome/browser/ui/cocoa/themed_window.h" |
| 26 #import "chrome/browser/ui/cocoa/url_drop_target.h" | 27 #import "chrome/browser/ui/cocoa/url_drop_target.h" |
| 27 #import "chrome/browser/ui/cocoa/view_resizer.h" | 28 #import "chrome/browser/ui/cocoa/view_resizer.h" |
| 28 #include "ui/gfx/rect.h" | 29 #include "ui/gfx/rect.h" |
| 29 | 30 |
| 30 @class AvatarButton; | 31 @class AvatarButton; |
| 31 class Browser; | 32 class Browser; |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 66 scoped_nsobject<ToolbarController> toolbarController_; | 67 scoped_nsobject<ToolbarController> toolbarController_; |
| 67 scoped_nsobject<TabStripController> tabStripController_; | 68 scoped_nsobject<TabStripController> tabStripController_; |
| 68 scoped_nsobject<FindBarCocoaController> findBarCocoaController_; | 69 scoped_nsobject<FindBarCocoaController> findBarCocoaController_; |
| 69 scoped_nsobject<InfoBarContainerController> infoBarContainerController_; | 70 scoped_nsobject<InfoBarContainerController> infoBarContainerController_; |
| 70 scoped_nsobject<DownloadShelfController> downloadShelfController_; | 71 scoped_nsobject<DownloadShelfController> downloadShelfController_; |
| 71 scoped_nsobject<BookmarkBarController> bookmarkBarController_; | 72 scoped_nsobject<BookmarkBarController> bookmarkBarController_; |
| 72 scoped_nsobject<DevToolsController> devToolsController_; | 73 scoped_nsobject<DevToolsController> devToolsController_; |
| 73 scoped_nsobject<SidebarController> sidebarController_; | 74 scoped_nsobject<SidebarController> sidebarController_; |
| 74 scoped_nsobject<PreviewableContentsController> previewableContentsController_; | 75 scoped_nsobject<PreviewableContentsController> previewableContentsController_; |
| 75 scoped_nsobject<PresentationModeController> presentationModeController_; | 76 scoped_nsobject<PresentationModeController> presentationModeController_; |
| 77 scoped_nsobject<FullscreenExitBubbleController> |
| 78 fullscreenExitBubbleController_; |
| 76 | 79 |
| 77 // Strong. StatusBubble is a special case of a strong reference that | 80 // Strong. StatusBubble is a special case of a strong reference that |
| 78 // we don't wrap in a scoped_ptr because it is acting the same | 81 // we don't wrap in a scoped_ptr because it is acting the same |
| 79 // as an NSWindowController in that it wraps a window that must | 82 // as an NSWindowController in that it wraps a window that must |
| 80 // be shut down before our destructors are called. | 83 // be shut down before our destructors are called. |
| 81 StatusBubbleMac* statusBubble_; | 84 StatusBubbleMac* statusBubble_; |
| 82 | 85 |
| 83 BookmarkBubbleController* bookmarkBubbleController_; // Weak. | 86 BookmarkBubbleController* bookmarkBubbleController_; // Weak. |
| 84 BOOL initializing_; // YES while we are currently in initWithBrowser: | 87 BOOL initializing_; // YES while we are currently in initWithBrowser: |
| 85 BOOL ownsBrowser_; // Only ever NO when testing | 88 BOOL ownsBrowser_; // Only ever NO when testing |
| (...skipping 361 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 447 - (void)resetWindowGrowthState; | 450 - (void)resetWindowGrowthState; |
| 448 | 451 |
| 449 // Computes by how far in each direction, horizontal and vertical, the | 452 // Computes by how far in each direction, horizontal and vertical, the |
| 450 // |source| rect doesn't fit into |target|. | 453 // |source| rect doesn't fit into |target|. |
| 451 - (NSSize)overflowFrom:(NSRect)source | 454 - (NSSize)overflowFrom:(NSRect)source |
| 452 to:(NSRect)target; | 455 to:(NSRect)target; |
| 453 @end // @interface BrowserWindowController (TestingAPI) | 456 @end // @interface BrowserWindowController (TestingAPI) |
| 454 | 457 |
| 455 | 458 |
| 456 #endif // CHROME_BROWSER_UI_COCOA_BROWSER_WINDOW_CONTROLLER_H_ | 459 #endif // CHROME_BROWSER_UI_COCOA_BROWSER_WINDOW_CONTROLLER_H_ |
| OLD | NEW |