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

Unified Diff: chrome/browser/ui/views/frame/contents_container.h

Issue 10915217: Hook up SetInstantPreviewHeight for ChromeOS. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: More comments. Created 8 years, 3 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 side-by-side diff with in-line comments
Download patch
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..114e76c4ea1d3a0cfecf494966966300d29574d1 100644
--- a/chrome/browser/ui/views/frame/contents_container.h
+++ b/chrome/browser/ui/views/frame/contents_container.h
@@ -5,6 +5,7 @@
#ifndef CHROME_BROWSER_UI_VIEWS_FRAME_CONTENTS_CONTAINER_H_
#define CHROME_BROWSER_UI_VIEWS_FRAME_CONTENTS_CONTAINER_H_
+#include "chrome/common/instant_types.h"
#include "ui/views/view.h"
namespace content {
@@ -45,6 +46,11 @@ 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.
+ void SetPreviewHeight(int height, InstantSizeUnits units);
+
content::WebContents* preview_web_contents() const {
return preview_web_contents_;
}
@@ -66,10 +72,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);
};

Powered by Google App Engine
This is Rietveld 408576698