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/basictypes.h" | 7 #include "base/basictypes.h" |
8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
9 #include "base/strings/utf_string_conversions.h" | 9 #include "base/strings/utf_string_conversions.h" |
10 #include "chrome/browser/ui/views/profiles/avatar_label.h" | 10 #include "chrome/browser/ui/views/profiles/avatar_label.h" |
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
121 } | 121 } |
122 | 122 |
123 virtual bool IsTabStripVisible() const OVERRIDE { | 123 virtual bool IsTabStripVisible() const OVERRIDE { |
124 return window_title_.empty(); | 124 return window_title_.empty(); |
125 } | 125 } |
126 | 126 |
127 virtual int GetTabStripHeight() const OVERRIDE { | 127 virtual int GetTabStripHeight() const OVERRIDE { |
128 return IsTabStripVisible() ? Tab::GetMinimumUnselectedSize().height() : 0; | 128 return IsTabStripVisible() ? Tab::GetMinimumUnselectedSize().height() : 0; |
129 } | 129 } |
130 | 130 |
131 virtual int GetAdditionalReservedSpaceInTabStrip() const OVERRIDE { | |
132 return 0; | |
133 } | |
134 | |
135 virtual gfx::Size GetTabstripPreferredSize() const OVERRIDE { | 131 virtual gfx::Size GetTabstripPreferredSize() const OVERRIDE { |
136 // Measured from Tabstrip::GetPreferredSize(). | 132 // Measured from Tabstrip::GetPreferredSize(). |
137 return IsTabStripVisible() ? gfx::Size(78, 29) : gfx::Size(0, 0); | 133 return IsTabStripVisible() ? gfx::Size(78, 29) : gfx::Size(0, 0); |
138 } | 134 } |
139 | 135 |
140 private: | 136 private: |
141 base::string16 window_title_; | 137 base::string16 window_title_; |
142 bool show_avatar_; | 138 bool show_avatar_; |
143 bool show_caption_buttons_; | 139 bool show_caption_buttons_; |
144 WindowState window_state_; | 140 WindowState window_state_; |
(...skipping 400 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
545 | 541 |
546 // Check the location of the avatar label relative to the avatar button if | 542 // Check the location of the avatar label relative to the avatar button if |
547 // both are displayed on the left side. | 543 // both are displayed on the left side. |
548 // The label height and width depends on the font size and the text displayed. | 544 // The label height and width depends on the font size and the text displayed. |
549 // This may possibly change, so we don't test it here. | 545 // This may possibly change, so we don't test it here. |
550 EXPECT_EQ(menu_button_->bounds().x() - 2, avatar_label_->bounds().x()); | 546 EXPECT_EQ(menu_button_->bounds().x() - 2, avatar_label_->bounds().x()); |
551 EXPECT_EQ( | 547 EXPECT_EQ( |
552 menu_button_->bounds().bottom() - 3 - avatar_label_->bounds().height(), | 548 menu_button_->bounds().bottom() - 3 - avatar_label_->bounds().height(), |
553 avatar_label_->bounds().y()); | 549 avatar_label_->bounds().y()); |
554 } | 550 } |
OLD | NEW |