Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(38)

Side by Side Diff: chrome/browser/ui/cocoa/tab_contents/overlayable_contents_controller.h

Issue 18009003: Instant Extended: Delete unused overlay code (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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/mac/scoped_nsobject.h" 10 #include "base/mac/scoped_nsobject.h"
(...skipping 26 matching lines...) Expand all
37 37
38 // The overlay WebContents. Will be NULL if no overlay is currently showing. 38 // The overlay WebContents. Will be NULL if no overlay is currently showing.
39 content::WebContents* overlayContents_; // weak 39 content::WebContents* overlayContents_; // weak
40 40
41 // C++ bridge to the Instant model change interface. 41 // C++ bridge to the Instant model change interface.
42 scoped_ptr<InstantOverlayControllerMac> instantOverlayController_; 42 scoped_ptr<InstantOverlayControllerMac> instantOverlayController_;
43 43
44 // The desired height of the overlay and units. 44 // The desired height of the overlay and units.
45 CGFloat overlayHeight_; 45 CGFloat overlayHeight_;
46 InstantSizeUnits overlayHeightUnits_; 46 InstantSizeUnits overlayHeightUnits_;
47
48 // If true then a shadow is drawn below the overlay. This is used to make the
49 // overlay "float" over the tab's web contents.
50 BOOL drawDropShadow_;
51
52 // View responsible for drawing a drop shadow.
53 base::scoped_nsobject<NSView> dropShadowView_;
54
55 // View responsible for drawing a separator at the top. The separator is
56 // only visible when the overlay is positioned right next to the omnibox.
57 base::scoped_nsobject<NSView> topSeparatorView_;
58
59 BrowserWindowController* windowController_;
60
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
63 // this is set to the height of the bookmark bar so that the bookmark bar is
64 // not obscured.
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_;
71 } 47 }
72 48
73 @property(readonly, nonatomic) NSView* activeContainer; 49 @property(readonly, nonatomic) NSView* activeContainer;
74 @property(readonly, nonatomic) NSView* dropShadowView;
75 @property(readonly, nonatomic) BOOL drawDropShadow;
76 @property(assign, nonatomic) CGFloat activeContainerOffset;
77 @property(assign, nonatomic) CGFloat overlayContentsOffset;
78 50
79 // Initialization. 51 // Initialization.
80 - (id)initWithBrowser:(Browser*)browser 52 - (id)initWithBrowser:(Browser*)browser
81 windowController:(BrowserWindowController*)windowController; 53 windowController:(BrowserWindowController*)windowController;
82 54
83 // Sets the current overlay and installs its WebContentsView into the view 55 // Sets the current overlay and installs its WebContentsView into the view
84 // hierarchy. Hides the active view. If |overlay| is NULL then closes the 56 // hierarchy. Hides the active view. If |overlay| is NULL then closes the
85 // current overlay and shows the active view. 57 // current overlay and shows the active view.
86 - (void)setOverlay:(content::WebContents*)overlay 58 - (void)setOverlay:(content::WebContents*)overlay
87 height:(CGFloat)height 59 height:(CGFloat)height
88 heightUnits:(InstantSizeUnits)heightUnits 60 heightUnits:(InstantSizeUnits)heightUnits
89 drawDropShadow:(BOOL)drawDropShadow; 61 drawDropShadow:(BOOL)drawDropShadow;
90 62
91 // Called when a tab with |contents| is activated, so that we can check to see 63 // Called when a tab with |contents| is activated, so that we can check to see
92 // if it's the overlay being activated (and adjust internal state accordingly). 64 // if it's the overlay being activated (and adjust internal state accordingly).
93 - (void)onActivateTabWithContents:(content::WebContents*)contents; 65 - (void)onActivateTabWithContents:(content::WebContents*)contents;
94 66
95 // Returns YES if the overlay contents is currently showing.
96 - (BOOL)isShowingOverlay;
97
98 - (InstantOverlayControllerMac*)instantOverlayController; 67 - (InstantOverlayControllerMac*)instantOverlayController;
99 68
100 - (void)activeContentsCompositingIOSurfaceCreated; 69 - (BOOL)isShowingOverlay;
101 70
102 @end 71 @end
103 72
104 #endif // CHROME_BROWSER_UI_COCOA_TAB_CONTENTS_OVERLAYABLE_CONTENTS_CONTROLLER_ H_ 73 #endif // CHROME_BROWSER_UI_COCOA_TAB_CONTENTS_OVERLAYABLE_CONTENTS_CONTROLLER_ H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698