| OLD | NEW |
| 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 Loading... |
| 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 // Use a transparent background color to avoid subpixel rendering. |
| 145 // gfx::Canvas::NO_SUBPIXEL_RENDERING flag and avoid some visual artifacts. | 145 window_title_->SetBackgroundColor(SK_ColorTRANSPARENT); |
| 146 window_title_->SetBackgroundColor(0x00000000); | |
| 147 window_title_->SetHorizontalAlignment(gfx::ALIGN_LEFT); | 146 window_title_->SetHorizontalAlignment(gfx::ALIGN_LEFT); |
| 148 window_title_->set_id(VIEW_ID_WINDOW_TITLE); | 147 window_title_->set_id(VIEW_ID_WINDOW_TITLE); |
| 149 AddChildView(window_title_); | 148 AddChildView(window_title_); |
| 150 | 149 |
| 151 if (browser_view->IsRegularOrGuestSession() && switches::IsNewAvatarMenu()) | 150 if (browser_view->IsRegularOrGuestSession() && switches::IsNewAvatarMenu()) |
| 152 UpdateNewStyleAvatarInfo(this, NewAvatarButton::THEMED_BUTTON); | 151 UpdateNewStyleAvatarInfo(this, NewAvatarButton::THEMED_BUTTON); |
| 153 else | 152 else |
| 154 UpdateAvatarInfo(); | 153 UpdateAvatarInfo(); |
| 155 | 154 |
| 156 if (!browser_view->IsOffTheRecord()) { | 155 if (!browser_view->IsOffTheRecord()) { |
| (...skipping 747 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 904 | 903 |
| 905 int OpaqueBrowserFrameView::GetTopAreaHeight() const { | 904 int OpaqueBrowserFrameView::GetTopAreaHeight() const { |
| 906 gfx::ImageSkia* frame_image = GetFrameImage(); | 905 gfx::ImageSkia* frame_image = GetFrameImage(); |
| 907 int top_area_height = frame_image->height(); | 906 int top_area_height = frame_image->height(); |
| 908 if (browser_view()->IsTabStripVisible()) { | 907 if (browser_view()->IsTabStripVisible()) { |
| 909 top_area_height = std::max(top_area_height, | 908 top_area_height = std::max(top_area_height, |
| 910 GetBoundsForTabStrip(browser_view()->tabstrip()).bottom()); | 909 GetBoundsForTabStrip(browser_view()->tabstrip()).bottom()); |
| 911 } | 910 } |
| 912 return top_area_height; | 911 return top_area_height; |
| 913 } | 912 } |
| OLD | NEW |