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

Side by Side Diff: views/window/custom_frame_view.cc

Issue 113441: ChromeFont->gfx::Font... (Closed) Base URL: svn://chrome-svn.corp.google.com/chrome/trunk/src/
Patch Set: Created 11 years, 7 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
« no previous file with comments | « views/window/custom_frame_view.h ('k') | views/window/dialog_client_view.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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 "views/window/custom_frame_view.h" 5 #include "views/window/custom_frame_view.h"
6 6
7 #include "app/gfx/chrome_canvas.h" 7 #include "app/gfx/chrome_canvas.h"
8 #include "app/gfx/chrome_font.h" 8 #include "app/gfx/chrome_font.h"
9 #include "app/gfx/path.h" 9 #include "app/gfx/path.h"
10 #include "app/resource_bundle.h" 10 #include "app/resource_bundle.h"
11 #include "app/theme_provider.h" 11 #include "app/theme_provider.h"
12 #if defined(OS_WIN) 12 #if defined(OS_WIN)
13 #include "app/win_util.h" 13 #include "app/win_util.h"
14 #include "base/win_util.h" 14 #include "base/win_util.h"
15 #endif 15 #endif
16 #include "grit/theme_resources.h" 16 #include "grit/theme_resources.h"
17 #include "views/window/client_view.h" 17 #include "views/window/client_view.h"
18 #if defined(OS_LINUX) 18 #if defined(OS_LINUX)
19 #include "views/window/hit_test.h" 19 #include "views/window/hit_test.h"
20 #endif 20 #endif
21 #include "views/window/window_delegate.h" 21 #include "views/window/window_delegate.h"
22 22
23 namespace views { 23 namespace views {
24 24
25 // static 25 // static
26 ChromeFont* CustomFrameView::title_font_ = NULL; 26 gfx::Font* CustomFrameView::title_font_ = NULL;
27 27
28 namespace { 28 namespace {
29 // The frame border is only visible in restored mode and is hardcoded to 4 px on 29 // The frame border is only visible in restored mode and is hardcoded to 4 px on
30 // each side regardless of the system window border size. 30 // each side regardless of the system window border size.
31 const int kFrameBorderThickness = 4; 31 const int kFrameBorderThickness = 4;
32 // Various edges of the frame border have a 1 px shadow along their edges; in a 32 // Various edges of the frame border have a 1 px shadow along their edges; in a
33 // few cases we shift elements based on this amount for visual appeal. 33 // few cases we shift elements based on this amount for visual appeal.
34 const int kFrameShadowThickness = 1; 34 const int kFrameShadowThickness = 1;
35 // While resize areas on Windows are normally the same size as the window 35 // While resize areas on Windows are normally the same size as the window
36 // borders, our top area is shrunk by 1 px to make it easier to move the window 36 // borders, our top area is shrunk by 1 px to make it easier to move the window
(...skipping 541 matching lines...) Expand 10 before | Expand all | Expand 10 after
578 top_height, 578 top_height,
579 std::max(0, width() - (2 * border_thickness)), 579 std::max(0, width() - (2 * border_thickness)),
580 std::max(0, height() - top_height - border_thickness)); 580 std::max(0, height() - top_height - border_thickness));
581 } 581 }
582 582
583 // static 583 // static
584 void CustomFrameView::InitClass() { 584 void CustomFrameView::InitClass() {
585 static bool initialized = false; 585 static bool initialized = false;
586 if (!initialized) { 586 if (!initialized) {
587 #if defined(OS_WIN) 587 #if defined(OS_WIN)
588 title_font_ = new ChromeFont(win_util::GetWindowTitleFont()); 588 title_font_ = new gfx::Font(win_util::GetWindowTitleFont());
589 #elif defined(OS_LINUX) 589 #elif defined(OS_LINUX)
590 // TODO: need to resolve what font this is. 590 // TODO: need to resolve what font this is.
591 title_font_ = new ChromeFont(); 591 title_font_ = new gfx::Font();
592 #endif 592 #endif
593 initialized = true; 593 initialized = true;
594 } 594 }
595 } 595 }
596 596
597 } // namespace views 597 } // namespace views
OLDNEW
« no previous file with comments | « views/window/custom_frame_view.h ('k') | views/window/dialog_client_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698