| 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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 42 class LocationBarViewMac; | 42 class LocationBarViewMac; |
| 43 @class OverlayableContentsController; | 43 @class OverlayableContentsController; |
| 44 class PermissionBubbleCocoa; | 44 class PermissionBubbleCocoa; |
| 45 @class PresentationModeController; | 45 @class PresentationModeController; |
| 46 class StatusBubbleMac; | 46 class StatusBubbleMac; |
| 47 @class TabStripController; | 47 @class TabStripController; |
| 48 @class TabStripView; | 48 @class TabStripView; |
| 49 @class ToolbarController; | 49 @class ToolbarController; |
| 50 @class TranslateBubbleController; | 50 @class TranslateBubbleController; |
| 51 | 51 |
| 52 namespace bookmarks { |
| 53 class BookmarkBubbleObserverCocoa; |
| 54 } |
| 55 |
| 52 namespace content { | 56 namespace content { |
| 53 class WebContents; | 57 class WebContents; |
| 54 } | 58 } |
| 55 | 59 |
| 56 namespace extensions { | 60 namespace extensions { |
| 57 class Command; | 61 class Command; |
| 58 } | 62 } |
| 59 | 63 |
| 60 @interface BrowserWindowController : | 64 @interface BrowserWindowController : |
| 61 TabWindowController<NSUserInterfaceValidations, | 65 TabWindowController<NSUserInterfaceValidations, |
| (...skipping 22 matching lines...) Expand all Loading... |
| 84 exclusiveAccessBubbleWindowController_; | 88 exclusiveAccessBubbleWindowController_; |
| 85 base::scoped_nsobject<BrowserWindowFullscreenTransition> | 89 base::scoped_nsobject<BrowserWindowFullscreenTransition> |
| 86 fullscreenTransition_; | 90 fullscreenTransition_; |
| 87 | 91 |
| 88 // Strong. StatusBubble is a special case of a strong reference that | 92 // Strong. StatusBubble is a special case of a strong reference that |
| 89 // we don't wrap in a scoped_ptr because it is acting the same | 93 // we don't wrap in a scoped_ptr because it is acting the same |
| 90 // as an NSWindowController in that it wraps a window that must | 94 // as an NSWindowController in that it wraps a window that must |
| 91 // be shut down before our destructors are called. | 95 // be shut down before our destructors are called. |
| 92 StatusBubbleMac* statusBubble_; | 96 StatusBubbleMac* statusBubble_; |
| 93 | 97 |
| 98 scoped_ptr<bookmarks::BookmarkBubbleObserverCocoa> bookmarkBubbleObserver_; |
| 94 BookmarkBubbleController* bookmarkBubbleController_; // Weak. | 99 BookmarkBubbleController* bookmarkBubbleController_; // Weak. |
| 95 BOOL initializing_; // YES while we are currently in initWithBrowser: | 100 BOOL initializing_; // YES while we are currently in initWithBrowser: |
| 96 BOOL ownsBrowser_; // Only ever NO when testing | 101 BOOL ownsBrowser_; // Only ever NO when testing |
| 97 | 102 |
| 98 TranslateBubbleController* translateBubbleController_; // Weak. | 103 TranslateBubbleController* translateBubbleController_; // Weak. |
| 99 | 104 |
| 100 // The total amount by which we've grown the window up or down (to display a | 105 // The total amount by which we've grown the window up or down (to display a |
| 101 // bookmark bar and/or download shelf), respectively; reset to 0 when moved | 106 // bookmark bar and/or download shelf), respectively; reset to 0 when moved |
| 102 // away from the bottom/top or resized (or zoomed). | 107 // away from the bottom/top or resized (or zoomed). |
| 103 CGFloat windowTopGrowth_; | 108 CGFloat windowTopGrowth_; |
| (...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 353 // image with |alignment| should be painted at. If the window does not have a | 358 // image with |alignment| should be painted at. If the window does not have a |
| 354 // tab strip, the offset for THEME_IMAGE_ALIGN_WITH_FRAME is always returned. | 359 // tab strip, the offset for THEME_IMAGE_ALIGN_WITH_FRAME is always returned. |
| 355 // The result of this method can be used in conjunction with | 360 // The result of this method can be used in conjunction with |
| 356 // [NSGraphicsContext cr_setPatternPhase:] to set the offset of pattern colors. | 361 // [NSGraphicsContext cr_setPatternPhase:] to set the offset of pattern colors. |
| 357 - (NSPoint)themeImagePositionForAlignment:(ThemeImageAlignment)alignment; | 362 - (NSPoint)themeImagePositionForAlignment:(ThemeImageAlignment)alignment; |
| 358 | 363 |
| 359 // Return the point to which a bubble window's arrow should point, in window | 364 // Return the point to which a bubble window's arrow should point, in window |
| 360 // coordinates. | 365 // coordinates. |
| 361 - (NSPoint)bookmarkBubblePoint; | 366 - (NSPoint)bookmarkBubblePoint; |
| 362 | 367 |
| 368 // Called by BookmarkBubbleObserverCocoa when the bubble is closed. |
| 369 - (void)bookmarkBubbleClosed; |
| 370 |
| 363 // Called when the Add Search Engine dialog is closed. | 371 // Called when the Add Search Engine dialog is closed. |
| 364 - (void)sheetDidEnd:(NSWindow*)sheet | 372 - (void)sheetDidEnd:(NSWindow*)sheet |
| 365 returnCode:(NSInteger)code | 373 returnCode:(NSInteger)code |
| 366 context:(void*)context; | 374 context:(void*)context; |
| 367 | 375 |
| 368 // Executes the command registered by the extension that has the given id. | 376 // Executes the command registered by the extension that has the given id. |
| 369 - (void)executeExtensionCommand:(const std::string&)extension_id | 377 - (void)executeExtensionCommand:(const std::string&)extension_id |
| 370 command:(const extensions::Command&)command; | 378 command:(const extensions::Command&)command; |
| 371 | 379 |
| 372 @end // @interface BrowserWindowController | 380 @end // @interface BrowserWindowController |
| (...skipping 233 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 606 - (ExclusiveAccessBubbleWindowController*)exclusiveAccessBubbleWindowController; | 614 - (ExclusiveAccessBubbleWindowController*)exclusiveAccessBubbleWindowController; |
| 607 | 615 |
| 608 // Gets the rect, in window base coordinates, that the omnibox popup should be | 616 // Gets the rect, in window base coordinates, that the omnibox popup should be |
| 609 // positioned relative to. | 617 // positioned relative to. |
| 610 - (NSRect)omniboxPopupAnchorRect; | 618 - (NSRect)omniboxPopupAnchorRect; |
| 611 | 619 |
| 612 @end // @interface BrowserWindowController (TestingAPI) | 620 @end // @interface BrowserWindowController (TestingAPI) |
| 613 | 621 |
| 614 | 622 |
| 615 #endif // CHROME_BROWSER_UI_COCOA_BROWSER_WINDOW_CONTROLLER_H_ | 623 #endif // CHROME_BROWSER_UI_COCOA_BROWSER_WINDOW_CONTROLLER_H_ |
| OLD | NEW |