OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_OPAQUE_BROWSER_FRAME_VIEW_LAYOUT_H_ | 5 #ifndef CHROME_BROWSER_UI_VIEWS_FRAME_OPAQUE_BROWSER_FRAME_VIEW_LAYOUT_H_ |
6 #define CHROME_BROWSER_UI_VIEWS_FRAME_OPAQUE_BROWSER_FRAME_VIEW_LAYOUT_H_ | 6 #define CHROME_BROWSER_UI_VIEWS_FRAME_OPAQUE_BROWSER_FRAME_VIEW_LAYOUT_H_ |
7 | 7 |
8 #include "chrome/browser/ui/views/frame/opaque_browser_frame_view.h" | 8 #include "chrome/browser/ui/views/frame/opaque_browser_frame_view.h" |
9 #include "ui/views/layout/layout_manager.h" | 9 #include "ui/views/layout/layout_manager.h" |
10 #include "ui/views/window/frame_buttons.h" | 10 #include "ui/views/window/frame_buttons.h" |
11 | 11 |
| 12 class NewAvatarButton; |
12 class OpaqueBrowserFrameViewLayoutDelegate; | 13 class OpaqueBrowserFrameViewLayoutDelegate; |
13 | 14 |
14 namespace views { | 15 namespace views { |
15 class ImageButton; | 16 class ImageButton; |
16 class Label; | 17 class Label; |
17 } | 18 } |
18 | 19 |
19 // Calculates the position of the widgets in the opaque browser frame view. | 20 // Calculates the position of the widgets in the opaque browser frame view. |
20 // | 21 // |
21 // This is separated out for testing reasons. OpaqueBrowserFrameView has tight | 22 // This is separated out for testing reasons. OpaqueBrowserFrameView has tight |
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
93 // side. | 94 // side. |
94 enum ButtonAlignment { | 95 enum ButtonAlignment { |
95 ALIGN_LEADING, | 96 ALIGN_LEADING, |
96 ALIGN_TRAILING | 97 ALIGN_TRAILING |
97 }; | 98 }; |
98 | 99 |
99 // Layout various sub-components of this view. | 100 // Layout various sub-components of this view. |
100 void LayoutWindowControls(views::View* host); | 101 void LayoutWindowControls(views::View* host); |
101 void LayoutTitleBar(views::View* host); | 102 void LayoutTitleBar(views::View* host); |
102 void LayoutAvatar(); | 103 void LayoutAvatar(); |
| 104 void LayoutNewStyleAvatar(views::View* host); |
103 | 105 |
104 void ConfigureButton(views::View* host, | 106 void ConfigureButton(views::View* host, |
105 views::FrameButton button_id, | 107 views::FrameButton button_id, |
106 ButtonAlignment align, | 108 ButtonAlignment align, |
107 int caption_y); | 109 int caption_y); |
108 | 110 |
109 // Sets the visibility of all buttons associated with |button_id| to false. | 111 // Sets the visibility of all buttons associated with |button_id| to false. |
110 void HideButton(views::FrameButton button_id); | 112 void HideButton(views::FrameButton button_id); |
111 | 113 |
112 // Adds a window caption button to either the leading or trailing side. | 114 // Adds a window caption button to either the leading or trailing side. |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
160 views::ImageButton* minimize_button_; | 162 views::ImageButton* minimize_button_; |
161 views::ImageButton* maximize_button_; | 163 views::ImageButton* maximize_button_; |
162 views::ImageButton* restore_button_; | 164 views::ImageButton* restore_button_; |
163 views::ImageButton* close_button_; | 165 views::ImageButton* close_button_; |
164 | 166 |
165 views::View* window_icon_; | 167 views::View* window_icon_; |
166 views::Label* window_title_; | 168 views::Label* window_title_; |
167 | 169 |
168 views::View* avatar_label_; | 170 views::View* avatar_label_; |
169 views::View* avatar_button_; | 171 views::View* avatar_button_; |
| 172 NewAvatarButton* new_avatar_button_; |
170 | 173 |
171 std::vector<views::FrameButton> leading_buttons_; | 174 std::vector<views::FrameButton> leading_buttons_; |
172 std::vector<views::FrameButton> trailing_buttons_; | 175 std::vector<views::FrameButton> trailing_buttons_; |
173 | 176 |
174 DISALLOW_COPY_AND_ASSIGN(OpaqueBrowserFrameViewLayout); | 177 DISALLOW_COPY_AND_ASSIGN(OpaqueBrowserFrameViewLayout); |
175 }; | 178 }; |
176 | 179 |
177 #endif // CHROME_BROWSER_UI_VIEWS_FRAME_OPAQUE_BROWSER_FRAME_VIEW_LAYOUT_H_ | 180 #endif // CHROME_BROWSER_UI_VIEWS_FRAME_OPAQUE_BROWSER_FRAME_VIEW_LAYOUT_H_ |
OLD | NEW |