| OLD | NEW |
| 1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 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_TAB_CONTENTS_OVERLAYABLE_CONTENTS_CONTROLLER_H_ | 5 #ifndef CHROME_BROWSER_UI_COCOA_TAB_CONTENTS_OVERLAYABLE_CONTENTS_CONTROLLER_H_ |
| 6 #define CHROME_BROWSER_UI_COCOA_TAB_CONTENTS_OVERLAYABLE_CONTENTS_CONTROLLER_H_ | 6 #define CHROME_BROWSER_UI_COCOA_TAB_CONTENTS_OVERLAYABLE_CONTENTS_CONTROLLER_H_ |
| 7 | 7 |
| 8 #import <Cocoa/Cocoa.h> | 8 #import <Cocoa/Cocoa.h> |
| 9 | 9 |
| 10 #include "base/memory/scoped_nsobject.h" | 10 #include "base/memory/scoped_nsobject.h" |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 56 // only visible when the overlay is positioned right next to the omnibox. | 56 // only visible when the overlay is positioned right next to the omnibox. |
| 57 scoped_nsobject<NSView> topSeparatorView_; | 57 scoped_nsobject<NSView> topSeparatorView_; |
| 58 | 58 |
| 59 BrowserWindowController* windowController_; | 59 BrowserWindowController* windowController_; |
| 60 | 60 |
| 61 // The vertical offset between the top of the view and the active container. | 61 // The vertical offset between the top of the view and the active container. |
| 62 // This is used to push the active container below the bookmark bar. Normally | 62 // This is used to push the active container below the bookmark bar. Normally |
| 63 // this is set to the height of the bookmark bar so that the bookmark bar is | 63 // this is set to the height of the bookmark bar so that the bookmark bar is |
| 64 // not obscured. | 64 // not obscured. |
| 65 CGFloat activeContainerOffset_; | 65 CGFloat activeContainerOffset_; |
| 66 |
| 67 // The vertical offset between the top of the view and the overlay. This is |
| 68 // used in presentation mode to push the overlay below the floating toolbar |
| 69 // view. |
| 70 CGFloat overlayContentsOffset_; |
| 66 } | 71 } |
| 67 | 72 |
| 68 @property(readonly, nonatomic) NSView* activeContainer; | 73 @property(readonly, nonatomic) NSView* activeContainer; |
| 69 @property(readonly, nonatomic) NSView* dropShadowView; | 74 @property(readonly, nonatomic) NSView* dropShadowView; |
| 70 @property(readonly, nonatomic) BOOL drawDropShadow; | 75 @property(readonly, nonatomic) BOOL drawDropShadow; |
| 71 @property(assign, nonatomic) CGFloat activeContainerOffset; | 76 @property(assign, nonatomic) CGFloat activeContainerOffset; |
| 77 @property(assign, nonatomic) CGFloat overlayContentsOffset; |
| 72 | 78 |
| 73 // Initialization. | 79 // Initialization. |
| 74 - (id)initWithBrowser:(Browser*)browser | 80 - (id)initWithBrowser:(Browser*)browser |
| 75 windowController:(BrowserWindowController*)windowController; | 81 windowController:(BrowserWindowController*)windowController; |
| 76 | 82 |
| 77 // Sets the current overlay and installs its WebContentsView into the view | 83 // Sets the current overlay and installs its WebContentsView into the view |
| 78 // hierarchy. Hides the active view. If |overlay| is NULL then closes the | 84 // hierarchy. Hides the active view. If |overlay| is NULL then closes the |
| 79 // current overlay and shows the active view. | 85 // current overlay and shows the active view. |
| 80 - (void)setOverlay:(content::WebContents*)overlay | 86 - (void)setOverlay:(content::WebContents*)overlay |
| 81 height:(CGFloat)height | 87 height:(CGFloat)height |
| 82 heightUnits:(InstantSizeUnits)heightUnits | 88 heightUnits:(InstantSizeUnits)heightUnits |
| 83 drawDropShadow:(BOOL)drawDropShadow; | 89 drawDropShadow:(BOOL)drawDropShadow; |
| 84 | 90 |
| 85 // Called when a tab with |contents| is activated, so that we can check to see | 91 // Called when a tab with |contents| is activated, so that we can check to see |
| 86 // if it's the overlay being activated (and adjust internal state accordingly). | 92 // if it's the overlay being activated (and adjust internal state accordingly). |
| 87 - (void)onActivateTabWithContents:(content::WebContents*)contents; | 93 - (void)onActivateTabWithContents:(content::WebContents*)contents; |
| 88 | 94 |
| 89 // Returns YES if the overlay contents is currently showing. | 95 // Returns YES if the overlay contents is currently showing. |
| 90 - (BOOL)isShowingOverlay; | 96 - (BOOL)isShowingOverlay; |
| 91 | 97 |
| 92 - (InstantOverlayControllerMac*)instantOverlayController; | 98 - (InstantOverlayControllerMac*)instantOverlayController; |
| 93 | 99 |
| 94 @end | 100 @end |
| 95 | 101 |
| 96 #endif // CHROME_BROWSER_UI_COCOA_TAB_CONTENTS_OVERLAYABLE_CONTENTS_CONTROLLER_
H_ | 102 #endif // CHROME_BROWSER_UI_COCOA_TAB_CONTENTS_OVERLAYABLE_CONTENTS_CONTROLLER_
H_ |
| OLD | NEW |