| 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 49f17df93fbea5be948ce1c7713946ac69a3bc8c..0e20cdecadebc94677cd9c27907c46117cb77918 100644
|
| --- a/chrome/browser/ui/views/frame/contents_container.h
|
| +++ b/chrome/browser/ui/views/frame/contents_container.h
|
| @@ -9,8 +9,6 @@
|
|
|
| #include "base/basictypes.h"
|
| #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"
|
|
|
| @@ -33,28 +31,23 @@ class ContentsContainer : public views::View {
|
| explicit ContentsContainer(views::WebView* active);
|
| virtual ~ContentsContainer();
|
|
|
| - // Makes the preview view the active view and nulls out the old active view.
|
| + // Makes the overlay view the active view and nulls out the old active view.
|
| // The caller must delete or remove the old active view separately.
|
| - void MakePreviewContentsActiveContents();
|
| + void MakeOverlayContentsActiveContents();
|
|
|
| - // Sets the preview view. This does not delete the old.
|
| - void SetPreview(views::WebView* preview,
|
| - content::WebContents* preview_web_contents,
|
| - const chrome::search::Mode& search_mode,
|
| + // Sets the overlay view. This does not delete the old.
|
| + void SetOverlay(views::WebView* overlay,
|
| + content::WebContents* overlay_web_contents,
|
| int height,
|
| - InstantSizeUnits units,
|
| + bool is_height_in_pixels,
|
| bool draw_drop_shadow);
|
|
|
| - // When the active content is reset and we have a visible preview,
|
| - // the preview must be stacked back at top.
|
| - void MaybeStackPreviewAtTop();
|
| -
|
| - content::WebContents* preview_web_contents() const {
|
| - return preview_web_contents_;
|
| + content::WebContents* overlay_web_contents() const {
|
| + return overlay_web_contents_;
|
| }
|
|
|
| - int preview_height() const {
|
| - return preview_ ? preview_->bounds().height() : 0;
|
| + int overlay_height() const {
|
| + return overlay_ ? overlay_->bounds().height() : 0;
|
| }
|
|
|
| // Sets the active top margin; the active WebView's y origin would be
|
| @@ -62,12 +55,11 @@ class ContentsContainer : public views::View {
|
| // vertically by |margin| pixels in the |ContentsContainer|.
|
| void SetActiveTopMargin(int margin);
|
|
|
| - // Returns the bounds the preview would be shown at.
|
| - gfx::Rect GetPreviewBounds() const;
|
| + // Returns the bounds the overlay would be shown at.
|
| + gfx::Rect GetOverlayBounds() const;
|
|
|
| - // Returns true if preview occupies full height of content page.
|
| - bool IsPreviewFullHeight(int preview_height,
|
| - InstantSizeUnits preview_height_units) const;
|
| + // Returns true if overlay occupies full height of content page.
|
| + bool IsOverlayFullHeight(int overlay_height, bool is_height_in_pixels) const;
|
|
|
| private:
|
| // Returns true if |shadow_view_| was a child of |ContentsContainer| and
|
| @@ -81,19 +73,18 @@ class ContentsContainer : public views::View {
|
| virtual std::string GetClassName() const OVERRIDE;
|
|
|
| views::WebView* active_;
|
| - views::WebView* preview_;
|
| + views::WebView* overlay_;
|
| scoped_ptr<views::View> shadow_view_;
|
| - content::WebContents* preview_web_contents_;
|
| - chrome::search::Mode search_mode_;
|
| + content::WebContents* overlay_web_contents_;
|
| bool draw_drop_shadow_;
|
|
|
| // 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.
|
| + // overlay 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_;
|
| + // The desired height of the overlay and whether it's in pixels or percent.
|
| + int overlay_height_;
|
| + bool is_height_in_pixels_;
|
|
|
| DISALLOW_COPY_AND_ASSIGN(ContentsContainer);
|
| };
|
|
|