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

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

Issue 341713002: Remove Label::PaintText overrides. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Sync and rebase. Created 6 years, 6 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 // TODO(msw): Use a transparent background color as a workaround to use the 144 window_title_->set_subpixel_rendering_enabled(false);
145 // gfx::Canvas::NO_SUBPIXEL_RENDERING flag and avoid some visual artifacts.
146 window_title_->SetBackgroundColor(0x00000000);
147 window_title_->SetHorizontalAlignment(gfx::ALIGN_LEFT); 145 window_title_->SetHorizontalAlignment(gfx::ALIGN_LEFT);
148 window_title_->set_id(VIEW_ID_WINDOW_TITLE); 146 window_title_->set_id(VIEW_ID_WINDOW_TITLE);
149 AddChildView(window_title_); 147 AddChildView(window_title_);
150 148
151 if (browser_view->IsRegularOrGuestSession() && switches::IsNewAvatarMenu()) 149 if (browser_view->IsRegularOrGuestSession() && switches::IsNewAvatarMenu())
152 UpdateNewStyleAvatarInfo(this, NewAvatarButton::THEMED_BUTTON); 150 UpdateNewStyleAvatarInfo(this, NewAvatarButton::THEMED_BUTTON);
153 else 151 else
154 UpdateAvatarInfo(); 152 UpdateAvatarInfo();
155 153
156 if (!browser_view->IsOffTheRecord()) { 154 if (!browser_view->IsOffTheRecord()) {
(...skipping 747 matching lines...) Expand 10 before | Expand all | Expand 10 after
904 902
905 int OpaqueBrowserFrameView::GetTopAreaHeight() const { 903 int OpaqueBrowserFrameView::GetTopAreaHeight() const {
906 gfx::ImageSkia* frame_image = GetFrameImage(); 904 gfx::ImageSkia* frame_image = GetFrameImage();
907 int top_area_height = frame_image->height(); 905 int top_area_height = frame_image->height();
908 if (browser_view()->IsTabStripVisible()) { 906 if (browser_view()->IsTabStripVisible()) {
909 top_area_height = std::max(top_area_height, 907 top_area_height = std::max(top_area_height,
910 GetBoundsForTabStrip(browser_view()->tabstrip()).bottom()); 908 GetBoundsForTabStrip(browser_view()->tabstrip()).bottom());
911 } 909 }
912 return top_area_height; 910 return top_area_height;
913 } 911 }
OLDNEW
« no previous file with comments | « ash/sticky_keys/sticky_keys_overlay.cc ('k') | chrome/browser/ui/views/frame/opaque_browser_frame_view_layout_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698