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 #include "chrome/browser/ui/views/frame/opaque_browser_frame_view_layout.h" | 5 #include "chrome/browser/ui/views/frame/opaque_browser_frame_view_layout.h" |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/macros.h" | 8 #include "base/macros.h" |
9 #include "base/strings/utf_string_conversions.h" | 9 #include "base/strings/utf_string_conversions.h" |
10 #include "chrome/browser/ui/layout_constants.h" | 10 #include "chrome/browser/ui/layout_constants.h" |
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
160 window_title_->SetVisible(delegate_->ShouldShowWindowTitle()); | 160 window_title_->SetVisible(delegate_->ShouldShowWindowTitle()); |
161 window_title_->SetEnabledColor(SK_ColorWHITE); | 161 window_title_->SetEnabledColor(SK_ColorWHITE); |
162 window_title_->SetSubpixelRenderingEnabled(false); | 162 window_title_->SetSubpixelRenderingEnabled(false); |
163 window_title_->SetHorizontalAlignment(gfx::ALIGN_LEFT); | 163 window_title_->SetHorizontalAlignment(gfx::ALIGN_LEFT); |
164 window_title_->set_id(VIEW_ID_WINDOW_TITLE); | 164 window_title_->set_id(VIEW_ID_WINDOW_TITLE); |
165 root_view_->AddChildView(window_title_); | 165 root_view_->AddChildView(window_title_); |
166 } | 166 } |
167 | 167 |
168 void AddNewAvatarButton() { | 168 void AddNewAvatarButton() { |
169 new_avatar_button_ = | 169 new_avatar_button_ = |
170 new views::MenuButton(nullptr, base::string16(), nullptr, false); | 170 new views::MenuButton(base::string16(), nullptr, false); |
171 new_avatar_button_->set_id(VIEW_ID_NEW_AVATAR_BUTTON); | 171 new_avatar_button_->set_id(VIEW_ID_NEW_AVATAR_BUTTON); |
172 root_view_->AddChildView(new_avatar_button_); | 172 root_view_->AddChildView(new_avatar_button_); |
173 delegate_->set_show_avatar(true); | 173 delegate_->set_show_avatar(true); |
174 } | 174 } |
175 | 175 |
176 int CaptionY() const { | 176 int CaptionY() const { |
177 return delegate_->IsMaximized() ? | 177 return delegate_->IsMaximized() ? |
178 0 : views::NonClientFrameView::kFrameShadowThickness; | 178 0 : views::NonClientFrameView::kFrameShadowThickness; |
179 } | 179 } |
180 | 180 |
(...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
437 | 437 |
438 for (int i = 0; i < 2; ++i) { | 438 for (int i = 0; i < 2; ++i) { |
439 root_view_->Layout(); | 439 root_view_->Layout(); |
440 SCOPED_TRACE(i == 0 ? "Window is restored" : "Window is maximized"); | 440 SCOPED_TRACE(i == 0 ? "Window is restored" : "Window is maximized"); |
441 ExpectCaptionButtons(false, 0); | 441 ExpectCaptionButtons(false, 0); |
442 ExpectTabStripAndMinimumSize(false); | 442 ExpectTabStripAndMinimumSize(false); |
443 ExpectAvatar(); | 443 ExpectAvatar(); |
444 delegate_->set_maximized(true); | 444 delegate_->set_maximized(true); |
445 } | 445 } |
446 } | 446 } |
OLD | NEW |