Chromium Code Reviews| Index: chrome/browser/ui/views/frame/contents_container.h |
| diff --git a/chrome/browser/ui/views/frame/contents_container.h b/chrome/browser/ui/views/frame/contents_container.h |
| index 61a59a39ddc53da592087afbcfe6290dc4f31f4e..7fdc9c7f7c7f6eab0f74a0766ad50c296660ee62 100644 |
| --- a/chrome/browser/ui/views/frame/contents_container.h |
| +++ b/chrome/browser/ui/views/frame/contents_container.h |
| @@ -6,6 +6,7 @@ |
| #define CHROME_BROWSER_UI_VIEWS_FRAME_CONTENTS_CONTAINER_H_ |
| #include "ui/views/view.h" |
| +#include "chrome/common/instant_types.h" |
|
sreeram
2012/09/18 22:28:08
Sort.
Jered
2012/09/18 22:46:24
Done.
|
| namespace content { |
| class WebContents; |
| @@ -45,6 +46,17 @@ class ContentsContainer : public views::View { |
| void SetPreview(views::WebView* preview, |
| content::WebContents* preview_web_contents); |
| views::WebView* preview() { return preview_; } |
| + |
| + // Sets the height of the preview. |
| + // |
| + // The default height is 100%, and each time the preview is cleared, the |
| + // default is restored. |
| + // |
| + // When the preview is not shown, the height has no effect. When the preview |
| + // is shown, the active page is pushed down below the preview and will be |
| + // visible if the preview height is less than 100%. |
|
sreeram
2012/09/18 22:24:24
Update the comment. We don't actually push the act
Jered
2012/09/18 22:46:24
Done.
|
| + void SetPreviewHeight(int height, InstantSizeUnits units); |
| + |
| content::WebContents* preview_web_contents() const { |
| return preview_web_contents_; |
| } |
| @@ -66,10 +78,17 @@ class ContentsContainer : public views::View { |
| views::WebView* preview_; |
| content::WebContents* preview_web_contents_; |
| + // Returns the current preview height, in pixels. |
| + int PreviewHeightInPixels() const; |
| + |
| // The margin between the top and the active view. This is used to make the |
| // preview overlap the bookmark bar on the new tab page. |
| int active_top_margin_; |
| + // The desired height of the preview and units. |
| + int preview_height_; |
| + InstantSizeUnits preview_height_units_; |
| + |
| DISALLOW_COPY_AND_ASSIGN(ContentsContainer); |
| }; |