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

Side by Side Diff: chrome/browser/ui/views/frame/opaque_browser_frame_view.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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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.h" 5 #include "chrome/browser/ui/views/frame/opaque_browser_frame_view.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <string> 8 #include <string>
9 9
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
134 window_icon_->set_id(VIEW_ID_WINDOW_ICON); 134 window_icon_->set_id(VIEW_ID_WINDOW_ICON);
135 AddChildView(window_icon_); 135 AddChildView(window_icon_);
136 window_icon_->Update(); 136 window_icon_->Update();
137 } 137 }
138 138
139 window_title_ = new views::Label( 139 window_title_ = new views::Label(
140 browser_view->GetWindowTitle(), 140 browser_view->GetWindowTitle(),
141 gfx::FontList(BrowserFrame::GetTitleFontList())); 141 gfx::FontList(BrowserFrame::GetTitleFontList()));
142 window_title_->SetVisible(browser_view->ShouldShowWindowTitle()); 142 window_title_->SetVisible(browser_view->ShouldShowWindowTitle());
143 window_title_->SetEnabledColor(SK_ColorWHITE); 143 window_title_->SetEnabledColor(SK_ColorWHITE);
144 window_title_->set_subpixel_rendering_enabled(false); 144 window_title_->SetSubpixelRenderingEnabled(false);
145 window_title_->SetHorizontalAlignment(gfx::ALIGN_LEFT); 145 window_title_->SetHorizontalAlignment(gfx::ALIGN_LEFT);
146 window_title_->set_id(VIEW_ID_WINDOW_TITLE); 146 window_title_->set_id(VIEW_ID_WINDOW_TITLE);
147 AddChildView(window_title_); 147 AddChildView(window_title_);
148 148
149 if (browser_view->IsRegularOrGuestSession() && switches::IsNewAvatarMenu()) 149 if (browser_view->IsRegularOrGuestSession() && switches::IsNewAvatarMenu())
150 UpdateNewStyleAvatarInfo(this, NewAvatarButton::THEMED_BUTTON); 150 UpdateNewStyleAvatarInfo(this, NewAvatarButton::THEMED_BUTTON);
151 else 151 else
152 UpdateAvatarInfo(); 152 UpdateAvatarInfo();
153 153
154 if (!browser_view->IsOffTheRecord()) { 154 if (!browser_view->IsOffTheRecord()) {
(...skipping 750 matching lines...) Expand 10 before | Expand all | Expand 10 after
905 905
906 int OpaqueBrowserFrameView::GetTopAreaHeight() const { 906 int OpaqueBrowserFrameView::GetTopAreaHeight() const {
907 gfx::ImageSkia* frame_image = GetFrameImage(); 907 gfx::ImageSkia* frame_image = GetFrameImage();
908 int top_area_height = frame_image->height(); 908 int top_area_height = frame_image->height();
909 if (browser_view()->IsTabStripVisible()) { 909 if (browser_view()->IsTabStripVisible()) {
910 top_area_height = std::max(top_area_height, 910 top_area_height = std::max(top_area_height,
911 GetBoundsForTabStrip(browser_view()->tabstrip()).bottom()); 911 GetBoundsForTabStrip(browser_view()->tabstrip()).bottom());
912 } 912 }
913 return top_area_height; 913 return top_area_height;
914 } 914 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698