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 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 Loading... |
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 } |
OLD | NEW |