OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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_VIEWS_FRAME_CONTENTS_CONTAINER_H_ | 5 #ifndef CHROME_BROWSER_VIEWS_FRAME_CONTENTS_CONTAINER_H_ |
6 #define CHROME_BROWSER_VIEWS_FRAME_CONTENTS_CONTAINER_H_ | 6 #define CHROME_BROWSER_VIEWS_FRAME_CONTENTS_CONTAINER_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include "views/view.h" | 9 #include "views/view.h" |
10 | 10 |
(...skipping 18 matching lines...) Expand all Loading... |
29 void MakePreviewContentsActiveContents(); | 29 void MakePreviewContentsActiveContents(); |
30 | 30 |
31 // Sets the preview view. This does not delete the old. | 31 // Sets the preview view. This does not delete the old. |
32 void SetPreview(views::View* preview, TabContents* preview_tab_contents); | 32 void SetPreview(views::View* preview, TabContents* preview_tab_contents); |
33 | 33 |
34 TabContents* preview_tab_contents() const { return preview_tab_contents_; } | 34 TabContents* preview_tab_contents() const { return preview_tab_contents_; } |
35 | 35 |
36 // Sets the active top margin. | 36 // Sets the active top margin. |
37 void SetActiveTopMargin(int margin); | 37 void SetActiveTopMargin(int margin); |
38 | 38 |
| 39 // Returns the bounds of the preview. If the preview isn't active this |
| 40 // retuns the bounds the preview would be shown at. |
| 41 gfx::Rect GetPreviewBounds(); |
| 42 |
39 // View overrides: | 43 // View overrides: |
40 virtual void Layout(); | 44 virtual void Layout(); |
41 | 45 |
42 private: | 46 private: |
43 #if defined(OS_WIN) | 47 #if defined(OS_WIN) |
44 class TearWindow; | 48 class TearWindow; |
45 #else | 49 #else |
46 typedef views::Widget TearWindow; | 50 typedef views::Widget TearWindow; |
47 #endif | 51 #endif |
48 | 52 |
(...skipping 24 matching lines...) Expand all Loading... |
73 TearWindow* tear_window_; | 77 TearWindow* tear_window_; |
74 | 78 |
75 // The margin between the top and the active view. This is used to make the | 79 // The margin between the top and the active view. This is used to make the |
76 // preview overlap the bookmark bar on the new tab page. | 80 // preview overlap the bookmark bar on the new tab page. |
77 int active_top_margin_; | 81 int active_top_margin_; |
78 | 82 |
79 DISALLOW_COPY_AND_ASSIGN(ContentsContainer); | 83 DISALLOW_COPY_AND_ASSIGN(ContentsContainer); |
80 }; | 84 }; |
81 | 85 |
82 #endif // CHROME_BROWSER_VIEWS_FRAME_CONTENTS_CONTAINER_H_ | 86 #endif // CHROME_BROWSER_VIEWS_FRAME_CONTENTS_CONTAINER_H_ |
OLD | NEW |