| OLD | NEW |
| 1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CHROME_BROWSER_UI_VIEWS_FRAME_CONTENTS_CONTAINER_H_ | 5 #ifndef CHROME_BROWSER_UI_VIEWS_FRAME_CONTENTS_CONTAINER_H_ |
| 6 #define CHROME_BROWSER_UI_VIEWS_FRAME_CONTENTS_CONTAINER_H_ | 6 #define CHROME_BROWSER_UI_VIEWS_FRAME_CONTENTS_CONTAINER_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 56 | 56 |
| 57 int overlay_height() const { | 57 int overlay_height() const { |
| 58 return overlay_ ? overlay_->bounds().height() : 0; | 58 return overlay_ ? overlay_->bounds().height() : 0; |
| 59 } | 59 } |
| 60 | 60 |
| 61 // Sets the active top margin; the active WebView's y origin would be | 61 // Sets the active top margin; the active WebView's y origin would be |
| 62 // positioned at this |margin|, causing the active WebView to be pushed down | 62 // positioned at this |margin|, causing the active WebView to be pushed down |
| 63 // vertically by |margin| pixels in the |ContentsContainer|. | 63 // vertically by |margin| pixels in the |ContentsContainer|. |
| 64 void SetActiveTopMargin(int margin); | 64 void SetActiveTopMargin(int margin); |
| 65 | 65 |
| 66 // Sets a vertical offset of |margin| pixels for the |overlay_| content, |
| 67 // similar to SetActiveTopMargin(). |
| 68 void SetOverlayTopMargin(int margin); |
| 69 |
| 66 // Returns the bounds the overlay would be shown at. | 70 // Returns the bounds the overlay would be shown at. |
| 67 gfx::Rect GetOverlayBounds() const; | 71 gfx::Rect GetOverlayBounds() const; |
| 68 | 72 |
| 69 // Returns true if overlay will occupy full height of content page based on | 73 // Returns true if overlay will occupy full height of content page based on |
| 70 // |overlay_height| and |overlay_height_units|. | 74 // |overlay_height| and |overlay_height_units|. |
| 71 bool WillOverlayBeFullHeight(int overlay_height, | 75 bool WillOverlayBeFullHeight(int overlay_height, |
| 72 InstantSizeUnits overlay_height_units) const; | 76 InstantSizeUnits overlay_height_units) const; |
| 73 | 77 |
| 74 // Returns true if |overlay_| is not NULL and it is occupying full height of | 78 // Returns true if |overlay_| is not NULL and it is occupying full height of |
| 75 // the content page. | 79 // the content page. |
| (...skipping 12 matching lines...) Expand all Loading... |
| 88 views::WebView* active_; | 92 views::WebView* active_; |
| 89 views::WebView* overlay_; | 93 views::WebView* overlay_; |
| 90 scoped_ptr<views::View> shadow_view_; | 94 scoped_ptr<views::View> shadow_view_; |
| 91 content::WebContents* overlay_web_contents_; | 95 content::WebContents* overlay_web_contents_; |
| 92 bool draw_drop_shadow_; | 96 bool draw_drop_shadow_; |
| 93 | 97 |
| 94 // The margin between the top and the active view. This is used to make the | 98 // The margin between the top and the active view. This is used to make the |
| 95 // overlay overlap the bookmark bar on the new tab page. | 99 // overlay overlap the bookmark bar on the new tab page. |
| 96 int active_top_margin_; | 100 int active_top_margin_; |
| 97 | 101 |
| 102 // The margin between the top of this view and the overlay view. Used to |
| 103 // push down the instant extended suggestions during an immersive fullscreen |
| 104 // reveal. |
| 105 int overlay_top_margin_; |
| 106 |
| 98 // The desired height of the overlay and units. | 107 // The desired height of the overlay and units. |
| 99 int overlay_height_; | 108 int overlay_height_; |
| 100 InstantSizeUnits overlay_height_units_; | 109 InstantSizeUnits overlay_height_units_; |
| 101 | 110 |
| 102 content::NotificationRegistrar registrar_; | 111 content::NotificationRegistrar registrar_; |
| 103 | 112 |
| 104 DISALLOW_COPY_AND_ASSIGN(ContentsContainer); | 113 DISALLOW_COPY_AND_ASSIGN(ContentsContainer); |
| 105 }; | 114 }; |
| 106 | 115 |
| 107 #endif // CHROME_BROWSER_UI_VIEWS_FRAME_CONTENTS_CONTAINER_H_ | 116 #endif // CHROME_BROWSER_UI_VIEWS_FRAME_CONTENTS_CONTAINER_H_ |
| OLD | NEW |