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_BROWSER_VIEW_LAYOUT_H_ | 5 #ifndef CHROME_BROWSER_VIEWS_FRAME_BROWSER_VIEW_LAYOUT_H_ |
6 #define CHROME_BROWSER_VIEWS_FRAME_BROWSER_VIEW_LAYOUT_H_ | 6 #define CHROME_BROWSER_VIEWS_FRAME_BROWSER_VIEW_LAYOUT_H_ |
7 | 7 |
8 #include "chrome/browser/views/frame/browser_view.h" | 8 #include "chrome/browser/views/frame/browser_view.h" |
9 #include "views/layout_manager.h" | 9 #include "views/layout_manager.h" |
10 | 10 |
(...skipping 29 matching lines...) Expand all Loading... |
40 | 40 |
41 protected: | 41 protected: |
42 Browser* browser() { | 42 Browser* browser() { |
43 return browser_view_->browser(); | 43 return browser_view_->browser(); |
44 } | 44 } |
45 | 45 |
46 // Layout the TabStrip, returns the coordinate of the bottom of the TabStrip, | 46 // Layout the TabStrip, returns the coordinate of the bottom of the TabStrip, |
47 // for laying out subsequent controls. | 47 // for laying out subsequent controls. |
48 virtual int LayoutTabStrip(); | 48 virtual int LayoutTabStrip(); |
49 | 49 |
50 // Layout the big icon and title in the top left of extension app windows. | |
51 void LayoutExtensionAppIconAndTitle(); | |
52 | |
53 // Layout the following controls, starting at |top|, returns the coordinate | 50 // Layout the following controls, starting at |top|, returns the coordinate |
54 // of the bottom of the control, for laying out the next control. | 51 // of the bottom of the control, for laying out the next control. |
55 virtual int LayoutToolbar(int top); | 52 virtual int LayoutToolbar(int top); |
56 int LayoutBookmarkAndInfoBars(int top); | 53 int LayoutBookmarkAndInfoBars(int top); |
57 int LayoutBookmarkBar(int top); | 54 int LayoutBookmarkBar(int top); |
58 int LayoutInfoBar(int top); | 55 int LayoutInfoBar(int top); |
59 | 56 |
60 // Layout the TabContents container, between the coordinates |top| and | 57 // Layout the TabContents container, between the coordinates |top| and |
61 // |bottom|. | 58 // |bottom|. |
62 void LayoutTabContents(int top, int bottom); | 59 void LayoutTabContents(int top, int bottom); |
63 int LayoutExtensionAndDownloadShelves(); | 60 int LayoutExtensionAndDownloadShelves(); |
64 | 61 |
65 // Layout the Download Shelf, returns the coordinate of the top of the | 62 // Layout the Download Shelf, returns the coordinate of the top of the |
66 // control, for laying out the previous control. | 63 // control, for laying out the previous control. |
67 int LayoutDownloadShelf(int bottom); | 64 int LayoutDownloadShelf(int bottom); |
68 | 65 |
69 // Layout the Extension Shelf, returns the coordinate of the top of the | 66 // Layout the Extension Shelf, returns the coordinate of the top of the |
70 // control, for laying out the previous control. | 67 // control, for laying out the previous control. |
71 int LayoutExtensionShelf(int bottom); | 68 int LayoutExtensionShelf(int bottom); |
72 | 69 |
73 // See description above vertical_layout_rect_ for details. | 70 // See description above vertical_layout_rect_ for details. |
74 void set_vertical_layout_rect(const gfx::Rect& bounds) { | 71 void set_vertical_layout_rect(const gfx::Rect& bounds) { |
75 vertical_layout_rect_ = bounds; | 72 vertical_layout_rect_ = bounds; |
76 } | 73 } |
77 const gfx::Rect& vertical_layout_rect() const { | 74 const gfx::Rect& vertical_layout_rect() const { |
78 return vertical_layout_rect_; | 75 return vertical_layout_rect_; |
79 } | 76 } |
80 | 77 |
81 // Child views that the layout manager manages. | 78 // Child views that the layout manager manages. |
82 views::ImageView* extension_app_icon_; | |
83 views::Label* extension_app_title_; | |
84 BaseTabStrip* tabstrip_; | 79 BaseTabStrip* tabstrip_; |
85 ToolbarView* toolbar_; | 80 ToolbarView* toolbar_; |
86 views::View* contents_split_; | 81 views::View* contents_split_; |
87 views::View* contents_container_; | 82 views::View* contents_container_; |
88 views::View* infobar_container_; | 83 views::View* infobar_container_; |
89 DownloadShelfView* download_shelf_; | 84 DownloadShelfView* download_shelf_; |
90 ExtensionShelf* extension_shelf_; | 85 ExtensionShelf* extension_shelf_; |
91 BookmarkBarView* active_bookmark_bar_; | 86 BookmarkBarView* active_bookmark_bar_; |
92 | 87 |
93 BrowserView* browser_view_; | 88 BrowserView* browser_view_; |
94 | 89 |
95 // The bounds within which the vertically-stacked contents of the BrowserView | 90 // The bounds within which the vertically-stacked contents of the BrowserView |
96 // should be laid out within. When the SideTabstrip is not visible, this is | 91 // should be laid out within. When the SideTabstrip is not visible, this is |
97 // just the local bounds of the BrowserView, otherwise it's the local bounds | 92 // just the local bounds of the BrowserView, otherwise it's the local bounds |
98 // of the BrowserView less the width of the SideTabstrip. | 93 // of the BrowserView less the width of the SideTabstrip. |
99 gfx::Rect vertical_layout_rect_; | 94 gfx::Rect vertical_layout_rect_; |
100 | 95 |
101 // The distance the FindBar is from the top of the window, in pixels. | 96 // The distance the FindBar is from the top of the window, in pixels. |
102 int find_bar_y_; | 97 int find_bar_y_; |
103 | 98 |
104 DISALLOW_COPY_AND_ASSIGN(BrowserViewLayout); | 99 DISALLOW_COPY_AND_ASSIGN(BrowserViewLayout); |
105 }; | 100 }; |
106 | 101 |
107 #endif // CHROME_BROWSER_VIEWS_FRAME_BROWSER_VIEW_LAYOUT_H_ | 102 #endif // CHROME_BROWSER_VIEWS_FRAME_BROWSER_VIEW_LAYOUT_H_ |
108 | 103 |
OLD | NEW |