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

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

Issue 7741001: Add Aura support to views: (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 3 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 "views/window/custom_frame_view.h" 5 #include "views/window/custom_frame_view.h"
6 6
7 #include "base/utf_string_conversions.h" 7 #include "base/utf_string_conversions.h"
8 #include "grit/ui_resources.h" 8 #include "grit/ui_resources.h"
9 #include "grit/ui_strings.h" 9 #include "grit/ui_strings.h"
10 #include "ui/base/l10n/l10n_util.h" 10 #include "ui/base/l10n/l10n_util.h"
11 #include "ui/base/resource/resource_bundle.h" 11 #include "ui/base/resource/resource_bundle.h"
12 #include "ui/gfx/canvas.h" 12 #include "ui/gfx/canvas.h"
13 #include "ui/gfx/font.h" 13 #include "ui/gfx/font.h"
14 #include "ui/gfx/path.h" 14 #include "ui/gfx/path.h"
15 #include "views/widget/widget_delegate.h" 15 #include "views/widget/widget_delegate.h"
16 #include "views/window/client_view.h" 16 #include "views/window/client_view.h"
17 #include "views/window/window_shape.h" 17 #include "views/window/window_shape.h"
18 18
19 #if defined(OS_LINUX) 19 #if defined(OS_LINUX)
20 #include "views/window/hit_test.h" 20 #include "views/window/hit_test.h"
21 #endif 21 #endif
22 22
23 #if defined(OS_WIN) 23 #if defined(OS_WIN) && !defined(USE_AURA)
24 #include "views/widget/native_widget_win.h" 24 #include "views/widget/native_widget_win.h"
25 #endif 25 #endif
26 26
27 namespace views { 27 namespace views {
28 28
29 // static 29 // static
30 gfx::Font* CustomFrameView::title_font_ = NULL; 30 gfx::Font* CustomFrameView::title_font_ = NULL;
31 31
32 namespace { 32 namespace {
33 // The frame border is only visible in restored mode and is hardcoded to 4 px on 33 // The frame border is only visible in restored mode and is hardcoded to 4 px on
(...skipping 526 matching lines...) Expand 10 before | Expand all | Expand 10 after
560 int border_thickness = NonClientBorderThickness(); 560 int border_thickness = NonClientBorderThickness();
561 client_view_bounds_.SetRect(border_thickness, top_height, 561 client_view_bounds_.SetRect(border_thickness, top_height,
562 std::max(0, width() - (2 * border_thickness)), 562 std::max(0, width() - (2 * border_thickness)),
563 std::max(0, height() - top_height - border_thickness)); 563 std::max(0, height() - top_height - border_thickness));
564 } 564 }
565 565
566 // static 566 // static
567 void CustomFrameView::InitClass() { 567 void CustomFrameView::InitClass() {
568 static bool initialized = false; 568 static bool initialized = false;
569 if (!initialized) { 569 if (!initialized) {
570 #if defined(OS_WIN) 570 #if defined(OS_WIN) && !defined(USE_AURA)
571 title_font_ = new gfx::Font(NativeWidgetWin::GetWindowTitleFont()); 571 title_font_ = new gfx::Font(NativeWidgetWin::GetWindowTitleFont());
572 #elif defined(OS_LINUX) 572 #elif defined(OS_LINUX)
573 // TODO(ben): need to resolve what font this is. 573 // TODO(ben): need to resolve what font this is.
574 title_font_ = new gfx::Font(); 574 title_font_ = new gfx::Font();
575 #endif 575 #endif
576 initialized = true; 576 initialized = true;
577 } 577 }
578 } 578 }
579 579
580 } // namespace views 580 } // namespace views
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698