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

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

Issue 6134010: Revert 71167 - Remove wstring from gfx.... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 11 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "app/l10n_util.h" 7 #include "app/l10n_util.h"
8 #include "app/resource_bundle.h" 8 #include "app/resource_bundle.h"
9 #include "app/theme_provider.h" 9 #include "app/theme_provider.h"
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
(...skipping 694 matching lines...) Expand 10 before | Expand all | Expand 10 after
705 } 705 }
706 706
707 void OpaqueBrowserFrameView::PaintTitleBar(gfx::Canvas* canvas) { 707 void OpaqueBrowserFrameView::PaintTitleBar(gfx::Canvas* canvas) {
708 // The window icon is painted by the TabIconView. 708 // The window icon is painted by the TabIconView.
709 views::WindowDelegate* delegate = frame_->GetWindow()->GetDelegate(); 709 views::WindowDelegate* delegate = frame_->GetWindow()->GetDelegate();
710 if (delegate == NULL) { 710 if (delegate == NULL) {
711 LOG(WARNING) << "delegate is NULL"; 711 LOG(WARNING) << "delegate is NULL";
712 return; 712 return;
713 } 713 }
714 if (delegate->ShouldShowWindowTitle()) { 714 if (delegate->ShouldShowWindowTitle()) {
715 canvas->DrawStringInt(WideToUTF16Hack(delegate->GetWindowTitle()), 715 canvas->DrawStringInt(delegate->GetWindowTitle(),
716 BrowserFrame::GetTitleFont(), 716 BrowserFrame::GetTitleFont(),
717 SK_ColorWHITE, MirroredLeftPointForRect(title_bounds_), 717 SK_ColorWHITE, MirroredLeftPointForRect(title_bounds_),
718 title_bounds_.y(), title_bounds_.width(), title_bounds_.height()); 718 title_bounds_.y(), title_bounds_.width(), title_bounds_.height());
719 /* TODO(pkasting): If this window is active, we should also draw a drop 719 /* TODO(pkasting): If this window is active, we should also draw a drop
720 * shadow on the title. This is tricky, because we don't want to hardcode a 720 * shadow on the title. This is tricky, because we don't want to hardcode a
721 * shadow color (since we want to work with various themes), but we can't 721 * shadow color (since we want to work with various themes), but we can't
722 * alpha-blend either (since the Windows text APIs don't really do this). 722 * alpha-blend either (since the Windows text APIs don't really do this).
723 * So we'd need to sample the background color at the right location and 723 * So we'd need to sample the background color at the right location and
724 * synthesize a good shadow color. */ 724 * synthesize a good shadow color. */
725 } 725 }
(...skipping 337 matching lines...) Expand 10 before | Expand all | Expand 10 after
1063 1063
1064 gfx::Rect OpaqueBrowserFrameView::CalculateClientAreaBounds(int width, 1064 gfx::Rect OpaqueBrowserFrameView::CalculateClientAreaBounds(int width,
1065 int height) const { 1065 int height) const {
1066 int top_height = NonClientTopBorderHeight(false, false); 1066 int top_height = NonClientTopBorderHeight(false, false);
1067 int border_thickness = NonClientBorderThickness(); 1067 int border_thickness = NonClientBorderThickness();
1068 return gfx::Rect(border_thickness, top_height, 1068 return gfx::Rect(border_thickness, top_height,
1069 std::max(0, width - (2 * border_thickness)), 1069 std::max(0, width - (2 * border_thickness)),
1070 std::max(0, height - GetReservedHeight() - 1070 std::max(0, height - GetReservedHeight() -
1071 top_height - border_thickness)); 1071 top_height - border_thickness));
1072 } 1072 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/download_item_view.cc ('k') | chrome/browser/ui/views/location_bar/content_setting_image_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698