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

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

Issue 12036075: alternate ntp: fix website page jankiness when suggestions show and top bars are hidden (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: addressed all comments Created 7 years, 11 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 4a24d79921243cf36f39a43831a02a8c567ee429..49f17df93fbea5be948ce1c7713946ac69a3bc8c 100644
--- a/chrome/browser/ui/views/frame/contents_container.h
+++ b/chrome/browser/ui/views/frame/contents_container.h
@@ -11,6 +11,7 @@
#include "base/compiler_specific.h"
#include "chrome/common/instant_types.h"
#include "chrome/common/search_types.h"
+#include "ui/views/controls/webview/webview.h"
#include "ui/views/view.h"
namespace content {
@@ -21,10 +22,6 @@ namespace gfx {
class Rect;
}
-namespace views {
-class WebView;
-}
-
// ContentsContainer is responsible for managing the WebContents views.
// ContentsContainer has up to two children: one for the currently active
// WebContents and one for Instant's WebContents.
@@ -56,7 +53,13 @@ class ContentsContainer : public views::View {
return preview_web_contents_;
}
- // Sets the active top margin.
+ int preview_height() const {
+ return preview_ ? preview_->bounds().height() : 0;
+ }
+
+ // Sets the active top margin; the active WebView's y origin would be
+ // positioned at this |margin|, causing the active WebView to be pushed down
+ // vertically by |margin| pixels in the |ContentsContainer|.
void SetActiveTopMargin(int margin);
// Returns the bounds the preview would be shown at.

Powered by Google App Engine
This is Rietveld 408576698