| 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 27 matching lines...) Expand all Loading... |
| 38 // Makes the preview view the active view and nulls out the old active view. | 38 // Makes the preview view the active view and nulls out the old active view. |
| 39 // The caller must delete or remove the old active view separately. | 39 // The caller must delete or remove the old active view separately. |
| 40 void MakePreviewContentsActiveContents(); | 40 void MakePreviewContentsActiveContents(); |
| 41 | 41 |
| 42 // Sets the preview view. This does not delete the old. | 42 // Sets the preview view. This does not delete the old. |
| 43 void SetPreview(views::WebView* preview, | 43 void SetPreview(views::WebView* preview, |
| 44 content::WebContents* preview_web_contents, | 44 content::WebContents* preview_web_contents, |
| 45 int height, | 45 int height, |
| 46 InstantSizeUnits units); | 46 InstantSizeUnits units); |
| 47 | 47 |
| 48 // When the active content is reset and we have a visible preview, |
| 49 // the preview must be stacked back at top. |
| 50 void MaybeStackPreviewAtTop(); |
| 51 |
| 48 content::WebContents* preview_web_contents() const { | 52 content::WebContents* preview_web_contents() const { |
| 49 return preview_web_contents_; | 53 return preview_web_contents_; |
| 50 } | 54 } |
| 51 | 55 |
| 52 // Sets the active top margin. | 56 // Sets the active top margin. |
| 53 void SetActiveTopMargin(int margin); | 57 void SetActiveTopMargin(int margin); |
| 54 | 58 |
| 55 // Returns the bounds the preview would be shown at. | 59 // Returns the bounds the preview would be shown at. |
| 56 gfx::Rect GetPreviewBounds() const; | 60 gfx::Rect GetPreviewBounds() const; |
| 57 | 61 |
| (...skipping 25 matching lines...) Expand all Loading... |
| 83 int preview_height_; | 87 int preview_height_; |
| 84 InstantSizeUnits preview_height_units_; | 88 InstantSizeUnits preview_height_units_; |
| 85 | 89 |
| 86 // Used to extend the child WebView beyond the contents view bottom bound. | 90 // Used to extend the child WebView beyond the contents view bottom bound. |
| 87 int extra_content_height_; | 91 int extra_content_height_; |
| 88 | 92 |
| 89 DISALLOW_COPY_AND_ASSIGN(ContentsContainer); | 93 DISALLOW_COPY_AND_ASSIGN(ContentsContainer); |
| 90 }; | 94 }; |
| 91 | 95 |
| 92 #endif // CHROME_BROWSER_UI_VIEWS_FRAME_CONTENTS_CONTAINER_H_ | 96 #endif // CHROME_BROWSER_UI_VIEWS_FRAME_CONTENTS_CONTAINER_H_ |
| OLD | NEW |