Chromium Code Reviews| 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..0c54b2ad7fbd25cee0a4044b21f4cda42114e7b3 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; |
| @@ -80,13 +93,30 @@ class BrowserViewLayout : public views::LayoutManager { |
| // Layout the WebContents container, between the coordinates |top| and |
| // |bottom|. |
| - void LayoutTabContents(int top, int bottom); |
| + void LayoutContentsSplitView(int top, int bottom); |
| + |
| + // Returns the vertical offset for the web contents to account for a |
| + // detached bookmarks bar. |
| + int GetContentsOffsetForBookmarkBar(); |
| // 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 top margin by which to adjust the instant overlay web |
| + // contents. Used to make instant extended suggestions align with the |
| + // omnibox in immersive fullscreen. |
| + int GetTopMarginForOverlayContent(); |
| + |
| + // Returns the top margin for the active or overlay web view in |
| + // |contents_container_| for an immersive fullscreen reveal while instant |
| + // extended is providing suggestions. |
| + int GetImmersiveInstantContentTopMargin(); |
|
kuan
2013/04/15 18:49:36
maybe name it like the above GetTopMarginFor...?
James Cook
2013/04/16 18:51:01
Done.
|
| + |
| + // 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 +124,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 +134,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. |