| 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 189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 200 | 200 |
| 201 void AddWindowTitleIcons() { | 201 void AddWindowTitleIcons() { |
| 202 tab_icon_view_ = new TabIconView(NULL, NULL); | 202 tab_icon_view_ = new TabIconView(NULL, NULL); |
| 203 tab_icon_view_->set_is_light(true); | 203 tab_icon_view_->set_is_light(true); |
| 204 tab_icon_view_->set_id(VIEW_ID_WINDOW_ICON); | 204 tab_icon_view_->set_id(VIEW_ID_WINDOW_ICON); |
| 205 root_view_->AddChildView(tab_icon_view_); | 205 root_view_->AddChildView(tab_icon_view_); |
| 206 | 206 |
| 207 window_title_ = new views::Label(delegate_->GetWindowTitle()); | 207 window_title_ = new views::Label(delegate_->GetWindowTitle()); |
| 208 window_title_->SetVisible(delegate_->ShouldShowWindowTitle()); | 208 window_title_->SetVisible(delegate_->ShouldShowWindowTitle()); |
| 209 window_title_->SetEnabledColor(SK_ColorWHITE); | 209 window_title_->SetEnabledColor(SK_ColorWHITE); |
| 210 window_title_->SetBackgroundColor(0x00000000); | 210 window_title_->SetBackgroundColor(SK_ColorTRANSPARENT); |
| 211 window_title_->SetHorizontalAlignment(gfx::ALIGN_LEFT); | 211 window_title_->SetHorizontalAlignment(gfx::ALIGN_LEFT); |
| 212 window_title_->set_id(VIEW_ID_WINDOW_TITLE); | 212 window_title_->set_id(VIEW_ID_WINDOW_TITLE); |
| 213 root_view_->AddChildView(window_title_); | 213 root_view_->AddChildView(window_title_); |
| 214 } | 214 } |
| 215 | 215 |
| 216 void AddAvatarButton() { | 216 void AddAvatarButton() { |
| 217 menu_button_ = new AvatarMenuButton(NULL, false); | 217 menu_button_ = new AvatarMenuButton(NULL, false); |
| 218 menu_button_->set_id(VIEW_ID_AVATAR_BUTTON); | 218 menu_button_->set_id(VIEW_ID_AVATAR_BUTTON); |
| 219 delegate_->SetShouldShowAvatar(true); | 219 delegate_->SetShouldShowAvatar(true); |
| 220 root_view_->AddChildView(menu_button_); | 220 root_view_->AddChildView(menu_button_); |
| (...skipping 321 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 542 | 542 |
| 543 // Check the location of the avatar label relative to the avatar button if | 543 // Check the location of the avatar label relative to the avatar button if |
| 544 // both are displayed on the left side. | 544 // both are displayed on the left side. |
| 545 // The label height and width depends on the font size and the text displayed. | 545 // The label height and width depends on the font size and the text displayed. |
| 546 // This may possibly change, so we don't test it here. | 546 // This may possibly change, so we don't test it here. |
| 547 EXPECT_EQ(menu_button_->bounds().x() - 2, avatar_label_->bounds().x()); | 547 EXPECT_EQ(menu_button_->bounds().x() - 2, avatar_label_->bounds().x()); |
| 548 EXPECT_EQ( | 548 EXPECT_EQ( |
| 549 menu_button_->bounds().bottom() - 3 - avatar_label_->bounds().height(), | 549 menu_button_->bounds().bottom() - 3 - avatar_label_->bounds().height(), |
| 550 avatar_label_->bounds().y()); | 550 avatar_label_->bounds().y()); |
| 551 } | 551 } |
| OLD | NEW |