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

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

Issue 13684002: cros: Instant extended support for immersive fullscreen (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years, 8 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/browser_view_layout.h
diff --git a/chrome/browser/ui/views/frame/browser_view_layout.h b/chrome/browser/ui/views/frame/browser_view_layout.h
index b669a747c705ce2b9238761b7e290d5909020b5f..0bb5b761c63c03501724d5fddee2d0a6006529de 100644
--- a/chrome/browser/ui/views/frame/browser_view_layout.h
+++ b/chrome/browser/ui/views/frame/browser_view_layout.h
@@ -33,6 +33,9 @@ class SingleSplitView;
// The layout manager used in chrome browser.
class BrowserViewLayout : public views::LayoutManager {
public:
+ // The vertical overlap between the TabStrip and the Toolbar.
+ static const int kToolbarTabStripVerticalOverlap;
+
BrowserViewLayout();
virtual ~BrowserViewLayout();
@@ -61,9 +64,19 @@ class BrowserViewLayout : public views::LayoutManager {
virtual void Layout(views::View* host) OVERRIDE;
virtual gfx::Size GetPreferredSize(views::View* host) OVERRIDE;
- protected:
+ private:
class WebContentsModalDialogHostViews;
+ enum InstantUIState {
+ // No instant suggestions are being shown.
+ kInstantUINone,
+ // Instant suggestions are displayed in a overlay overlapping the tab
+ // contents.
+ kInstantUIOverlay,
+ // Instant suggestions are displayed in the main tab contents.
+ kInstantUIFullPageResults,
+ };
+
Browser* browser();
const Browser* browser() const;
@@ -79,14 +92,20 @@ class BrowserViewLayout : public views::LayoutManager {
int LayoutInfoBar(int top);
// Layout the WebContents container, between the coordinates |top| and
- // |bottom|.
- void LayoutTabContents(int top, int bottom);
+ // |bottom|. |contents_origin| must be the position of the web contents
+ // at the beginning of the layout pass.
+ void LayoutTabContents(int top,
+ int bottom,
+ const gfx::Point& contents_origin);
// Returns the top margin to adjust the contents_container_ by. This is used
// to make the bookmark bar and contents_container_ overlap so that the
// preview contents hides the bookmark bar.
int GetTopMarginForActiveContent();
+ // Returns the state of instant extended suggestions.
+ InstantUIState GetInstantUIState();
+
// Layout the Download Shelf, returns the coordinate of the top of the
// control, for laying out the previous control.
int LayoutDownloadShelf(int bottom);
@@ -94,14 +113,6 @@ class BrowserViewLayout : public views::LayoutManager {
// Returns true if an infobar is showing.
bool InfobarVisible() const;
- // See description above vertical_layout_rect_ for details.
- void set_vertical_layout_rect(const gfx::Rect& bounds) {
- vertical_layout_rect_ = bounds;
- }
- const gfx::Rect& vertical_layout_rect() const {
- return vertical_layout_rect_;
- }
-
// Child views that the layout manager manages.
views::SingleSplitView* contents_split_;
ContentsContainer* contents_container_;
@@ -112,6 +123,7 @@ class BrowserViewLayout : public views::LayoutManager {
// The bounds within which the vertically-stacked contents of the BrowserView
// should be laid out within. This is just the local bounds of the
// BrowserView.
+ // TODO(jamescook): Remove this and just use browser_view_->GetLocalBounds().
gfx::Rect vertical_layout_rect_;
// The distance the FindBar is from the top of the window, in pixels.

Powered by Google App Engine
This is Rietveld 408576698