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 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
126 window_title_ = new views::Label( | 126 window_title_ = new views::Label( |
127 browser_view->GetWindowTitle(), | 127 browser_view->GetWindowTitle(), |
128 gfx::FontList(BrowserFrame::GetTitleFontList())); | 128 gfx::FontList(BrowserFrame::GetTitleFontList())); |
129 window_title_->SetVisible(browser_view->ShouldShowWindowTitle()); | 129 window_title_->SetVisible(browser_view->ShouldShowWindowTitle()); |
130 window_title_->SetEnabledColor(SK_ColorWHITE); | 130 window_title_->SetEnabledColor(SK_ColorWHITE); |
131 window_title_->SetSubpixelRenderingEnabled(false); | 131 window_title_->SetSubpixelRenderingEnabled(false); |
132 window_title_->SetHorizontalAlignment(gfx::ALIGN_LEFT); | 132 window_title_->SetHorizontalAlignment(gfx::ALIGN_LEFT); |
133 window_title_->set_id(VIEW_ID_WINDOW_TITLE); | 133 window_title_->set_id(VIEW_ID_WINDOW_TITLE); |
134 AddChildView(window_title_); | 134 AddChildView(window_title_); |
135 | 135 |
136 UpdateAvatar(); | |
137 | |
138 platform_observer_.reset(OpaqueBrowserFrameViewPlatformSpecific::Create( | 136 platform_observer_.reset(OpaqueBrowserFrameViewPlatformSpecific::Create( |
139 this, layout_, | 137 this, layout_, |
140 ThemeServiceFactory::GetForProfile(browser_view->browser()->profile()))); | 138 ThemeServiceFactory::GetForProfile(browser_view->browser()->profile()))); |
141 } | 139 } |
142 | 140 |
143 OpaqueBrowserFrameView::~OpaqueBrowserFrameView() { | 141 OpaqueBrowserFrameView::~OpaqueBrowserFrameView() { |
144 } | 142 } |
145 | 143 |
146 /////////////////////////////////////////////////////////////////////////////// | 144 /////////////////////////////////////////////////////////////////////////////// |
147 // OpaqueBrowserFrameView, BrowserNonClientFrameView implementation: | 145 // OpaqueBrowserFrameView, BrowserNonClientFrameView implementation: |
(...skipping 681 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
829 gfx::Rect side(x, y, kClientEdgeThickness, h); | 827 gfx::Rect side(x, y, kClientEdgeThickness, h); |
830 canvas->FillRect(side, color); | 828 canvas->FillRect(side, color); |
831 if (draw_bottom) { | 829 if (draw_bottom) { |
832 canvas->FillRect(gfx::Rect(x, y + h, w + (2 * kClientEdgeThickness), | 830 canvas->FillRect(gfx::Rect(x, y + h, w + (2 * kClientEdgeThickness), |
833 kClientEdgeThickness), | 831 kClientEdgeThickness), |
834 color); | 832 color); |
835 } | 833 } |
836 side.Offset(w + kClientEdgeThickness, 0); | 834 side.Offset(w + kClientEdgeThickness, 0); |
837 canvas->FillRect(side, color); | 835 canvas->FillRect(side, color); |
838 } | 836 } |
OLD | NEW |