Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(96)

Side by Side Diff: chrome/browser/ui/views/frame/opaque_browser_frame_view_layout_unittest.cc

Issue 23228004: Prepare to use gfx::RenderText in views::Label. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Revert Label implementation changes. Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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_->set_subpixel_rendering_enabled(false); 210 window_title_->SetSubpixelRenderingEnabled(false);
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
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 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/frame/opaque_browser_frame_view.cc ('k') | chrome/browser/ui/views/tabs/tab.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698