| 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_PREVIEWABLE_CONTENTS_CONTROLLER_H_ | 5 #ifndef CHROME_BROWSER_UI_COCOA_TAB_CONTENTS_PREVIEWABLE_CONTENTS_CONTROLLER_H_ |
| 6 #define CHROME_BROWSER_UI_COCOA_TAB_CONTENTS_PREVIEWABLE_CONTENTS_CONTROLLER_H_ | 6 #define CHROME_BROWSER_UI_COCOA_TAB_CONTENTS_PREVIEWABLE_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 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 70 @property(readonly, nonatomic) NSView* dropShadowView; | 70 @property(readonly, nonatomic) NSView* dropShadowView; |
| 71 @property(readonly, nonatomic) BOOL drawDropShadow; | 71 @property(readonly, nonatomic) BOOL drawDropShadow; |
| 72 @property(assign, nonatomic) CGFloat previewOffset; | 72 @property(assign, nonatomic) CGFloat previewOffset; |
| 73 @property(assign, nonatomic) CGFloat activeContainerOffset; | 73 @property(assign, nonatomic) CGFloat activeContainerOffset; |
| 74 | 74 |
| 75 // Initialization. | 75 // Initialization. |
| 76 - (id)initWithBrowser:(Browser*)browser | 76 - (id)initWithBrowser:(Browser*)browser |
| 77 windowController:(BrowserWindowController*)windowController; | 77 windowController:(BrowserWindowController*)windowController; |
| 78 | 78 |
| 79 // Sets the current preview and installs its WebContentsView into the view | 79 // Sets the current preview and installs its WebContentsView into the view |
| 80 // hierarchy. Hides the active view. |preview| must not be NULL. | 80 // hierarchy. Hides the active view. If |preview| is NULL then closes the |
| 81 - (void)showPreview:(content::WebContents*)preview | 81 // current preview and shows the active view. |
| 82 height:(CGFloat)height | 82 - (void)setPreview:(content::WebContents*)preview |
| 83 heightUnits:(InstantSizeUnits)heightUnits | 83 height:(CGFloat)height |
| 84 drawDropShadow:(BOOL)drawDropShadow; | 84 heightUnits:(InstantSizeUnits)heightUnits |
| 85 | 85 drawDropShadow:(BOOL)drawDropShadow; |
| 86 // Closes the current preview and shows the active view. | |
| 87 - (void)hidePreview; | |
| 88 | 86 |
| 89 // Called when a tab with |contents| is activated, so that we can check to see | 87 // Called when a tab with |contents| is activated, so that we can check to see |
| 90 // if it's the preview being activated (and adjust internal state accordingly). | 88 // if it's the preview being activated (and adjust internal state accordingly). |
| 91 - (void)onActivateTabWithContents:(content::WebContents*)contents; | 89 - (void)onActivateTabWithContents:(content::WebContents*)contents; |
| 92 | 90 |
| 93 // Returns YES if the preview contents is currently showing. | 91 // Returns YES if the preview contents is currently showing. |
| 94 - (BOOL)isShowingPreview; | 92 - (BOOL)isShowingPreview; |
| 95 | 93 |
| 96 - (InstantPreviewControllerMac*)instantPreviewController; | 94 - (InstantPreviewControllerMac*)instantPreviewController; |
| 97 | 95 |
| 98 @end | 96 @end |
| 99 | 97 |
| 100 #endif // CHROME_BROWSER_UI_COCOA_TAB_CONTENTS_PREVIEWABLE_CONTENTS_CONTROLLER_
H_ | 98 #endif // CHROME_BROWSER_UI_COCOA_TAB_CONTENTS_PREVIEWABLE_CONTENTS_CONTROLLER_
H_ |
| OLD | NEW |