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

Unified Diff: views/widget/native_widget_aura.cc

Issue 7744045: Show a Window in the aura views demo. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « views/widget/native_widget_aura.h ('k') | views/widget/widget.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: views/widget/native_widget_aura.cc
===================================================================
--- views/widget/native_widget_aura.cc (revision 98331)
+++ views/widget/native_widget_aura.cc (working copy)
@@ -7,8 +7,15 @@
#include "aura/window.h"
#include "ui/gfx/canvas.h"
#include "ui/gfx/compositor/layer.h"
+#include "ui/gfx/font.h"
#include "views/widget/native_widget_delegate.h"
+#if defined(OS_WIN)
+#include "base/win/scoped_gdi_object.h"
+#include "base/win/win_util.h"
+#include "ui/base/l10n/l10n_util_win.h"
+#endif
+
namespace views {
////////////////////////////////////////////////////////////////////////////////
@@ -23,6 +30,19 @@
NativeWidgetAura::~NativeWidgetAura() {
}
+// static
+gfx::Font NativeWidgetAura::GetWindowTitleFont() {
+#if defined(OS_WIN)
+ NONCLIENTMETRICS ncm;
+ base::win::GetNonClientMetrics(&ncm);
+ l10n_util::AdjustUIFont(&(ncm.lfCaptionFont));
+ base::win::ScopedHFONT caption_font(CreateFontIndirect(&(ncm.lfCaptionFont)));
+ return gfx::Font(caption_font);
+#else
+ return gfx::Font();
+#endif
+}
+
////////////////////////////////////////////////////////////////////////////////
// NativeWidgetAura, internal::NativeWidgetPrivate implementation:
« no previous file with comments | « views/widget/native_widget_aura.h ('k') | views/widget/widget.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698