| 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 "build/build_config.h" | 7 #include "build/build_config.h" |
| 8 #include "chrome/browser/themes/theme_properties.h" | 8 #include "chrome/browser/themes/theme_properties.h" |
| 9 #include "chrome/browser/themes/theme_service_factory.h" | 9 #include "chrome/browser/themes/theme_service_factory.h" |
| 10 #include "chrome/browser/ui/layout_constants.h" | 10 #include "chrome/browser/ui/layout_constants.h" |
| (...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 100 | 100 |
| 101 // Initializing the TabIconView is expensive, so only do it if we need to. | 101 // Initializing the TabIconView is expensive, so only do it if we need to. |
| 102 if (browser_view->ShouldShowWindowIcon()) { | 102 if (browser_view->ShouldShowWindowIcon()) { |
| 103 window_icon_ = new TabIconView(this, this); | 103 window_icon_ = new TabIconView(this, this); |
| 104 window_icon_->set_is_light(true); | 104 window_icon_->set_is_light(true); |
| 105 window_icon_->set_id(VIEW_ID_WINDOW_ICON); | 105 window_icon_->set_id(VIEW_ID_WINDOW_ICON); |
| 106 AddChildView(window_icon_); | 106 AddChildView(window_icon_); |
| 107 window_icon_->Update(); | 107 window_icon_->Update(); |
| 108 } | 108 } |
| 109 | 109 |
| 110 window_title_ = | 110 window_title_ = new views::Label(browser_view->GetWindowTitle(), |
| 111 new views::Label(browser_view->GetWindowTitle(), | 111 views::Label::CustomFont{gfx::FontList( |
| 112 {gfx::FontList(BrowserFrame::GetTitleFontList())}); | 112 BrowserFrame::GetTitleFontList())}); |
| 113 window_title_->SetVisible(browser_view->ShouldShowWindowTitle()); | 113 window_title_->SetVisible(browser_view->ShouldShowWindowTitle()); |
| 114 window_title_->SetEnabledColor(SK_ColorWHITE); | 114 window_title_->SetEnabledColor(SK_ColorWHITE); |
| 115 window_title_->SetSubpixelRenderingEnabled(false); | 115 window_title_->SetSubpixelRenderingEnabled(false); |
| 116 window_title_->SetHorizontalAlignment(gfx::ALIGN_LEFT); | 116 window_title_->SetHorizontalAlignment(gfx::ALIGN_LEFT); |
| 117 window_title_->set_id(VIEW_ID_WINDOW_TITLE); | 117 window_title_->set_id(VIEW_ID_WINDOW_TITLE); |
| 118 AddChildView(window_title_); | 118 AddChildView(window_title_); |
| 119 | 119 |
| 120 platform_observer_.reset(OpaqueBrowserFrameViewPlatformSpecific::Create( | 120 platform_observer_.reset(OpaqueBrowserFrameViewPlatformSpecific::Create( |
| 121 this, layout_, | 121 this, layout_, |
| 122 ThemeServiceFactory::GetForProfile(browser_view->browser()->profile()))); | 122 ThemeServiceFactory::GetForProfile(browser_view->browser()->profile()))); |
| (...skipping 542 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 665 gfx::Rect side(x, y, kClientEdgeThickness, h); | 665 gfx::Rect side(x, y, kClientEdgeThickness, h); |
| 666 canvas->FillRect(side, color); | 666 canvas->FillRect(side, color); |
| 667 if (draw_bottom) { | 667 if (draw_bottom) { |
| 668 canvas->FillRect(gfx::Rect(x, y + h, w + (2 * kClientEdgeThickness), | 668 canvas->FillRect(gfx::Rect(x, y + h, w + (2 * kClientEdgeThickness), |
| 669 kClientEdgeThickness), | 669 kClientEdgeThickness), |
| 670 color); | 670 color); |
| 671 } | 671 } |
| 672 side.Offset(w + kClientEdgeThickness, 0); | 672 side.Offset(w + kClientEdgeThickness, 0); |
| 673 canvas->FillRect(side, color); | 673 canvas->FillRect(side, color); |
| 674 } | 674 } |
| OLD | NEW |