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 |
20 | |
sky
2013/10/03 23:23:11
remove newline.
noms (inactive)
2013/10/07 21:18:15
Done.
| |
19 // Calculates the position of the widgets in the opaque browser frame view. | 21 // Calculates the position of the widgets in the opaque browser frame view. |
20 // | 22 // |
21 // This is separated out for testing reasons. OpaqueBrowserFrameView has tight | 23 // This is separated out for testing reasons. OpaqueBrowserFrameView has tight |
22 // dependencies with Browser and classes that depend on Browser. | 24 // dependencies with Browser and classes that depend on Browser. |
23 class OpaqueBrowserFrameViewLayout : public views::LayoutManager { | 25 class OpaqueBrowserFrameViewLayout : public views::LayoutManager { |
24 public: | 26 public: |
25 explicit OpaqueBrowserFrameViewLayout( | 27 explicit OpaqueBrowserFrameViewLayout( |
26 OpaqueBrowserFrameViewLayoutDelegate* delegate); | 28 OpaqueBrowserFrameViewLayoutDelegate* delegate); |
27 virtual ~OpaqueBrowserFrameViewLayout(); | 29 virtual ~OpaqueBrowserFrameViewLayout(); |
28 | 30 |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
93 // side. | 95 // side. |
94 enum ButtonAlignment { | 96 enum ButtonAlignment { |
95 ALIGN_LEADING, | 97 ALIGN_LEADING, |
96 ALIGN_TRAILING | 98 ALIGN_TRAILING |
97 }; | 99 }; |
98 | 100 |
99 // Layout various sub-components of this view. | 101 // Layout various sub-components of this view. |
100 void LayoutWindowControls(views::View* host); | 102 void LayoutWindowControls(views::View* host); |
101 void LayoutTitleBar(views::View* host); | 103 void LayoutTitleBar(views::View* host); |
102 void LayoutAvatar(); | 104 void LayoutAvatar(); |
105 void LayoutNewStyleAvatar(views::View* host); | |
103 | 106 |
104 void ConfigureButton(views::View* host, | 107 void ConfigureButton(views::View* host, |
105 views::FrameButton button_id, | 108 views::FrameButton button_id, |
106 ButtonAlignment align, | 109 ButtonAlignment align, |
107 int caption_y); | 110 int caption_y); |
108 | 111 |
109 // Sets the visibility of all buttons associated with |button_id| to false. | 112 // Sets the visibility of all buttons associated with |button_id| to false. |
110 void HideButton(views::FrameButton button_id); | 113 void HideButton(views::FrameButton button_id); |
111 | 114 |
112 // Adds a window caption button to either the leading or trailing side. | 115 // 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_; | 163 views::ImageButton* minimize_button_; |
161 views::ImageButton* maximize_button_; | 164 views::ImageButton* maximize_button_; |
162 views::ImageButton* restore_button_; | 165 views::ImageButton* restore_button_; |
163 views::ImageButton* close_button_; | 166 views::ImageButton* close_button_; |
164 | 167 |
165 views::View* window_icon_; | 168 views::View* window_icon_; |
166 views::Label* window_title_; | 169 views::Label* window_title_; |
167 | 170 |
168 views::View* avatar_label_; | 171 views::View* avatar_label_; |
169 views::View* avatar_button_; | 172 views::View* avatar_button_; |
173 NewAvatarButton* new_avatar_button_; | |
170 | 174 |
171 std::vector<views::FrameButton> leading_buttons_; | 175 std::vector<views::FrameButton> leading_buttons_; |
172 std::vector<views::FrameButton> trailing_buttons_; | 176 std::vector<views::FrameButton> trailing_buttons_; |
173 | 177 |
174 DISALLOW_COPY_AND_ASSIGN(OpaqueBrowserFrameViewLayout); | 178 DISALLOW_COPY_AND_ASSIGN(OpaqueBrowserFrameViewLayout); |
175 }; | 179 }; |
176 | 180 |
177 #endif // CHROME_BROWSER_UI_VIEWS_FRAME_OPAQUE_BROWSER_FRAME_VIEW_LAYOUT_H_ | 181 #endif // CHROME_BROWSER_UI_VIEWS_FRAME_OPAQUE_BROWSER_FRAME_VIEW_LAYOUT_H_ |
OLD | NEW |