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

Side by Side Diff: ui/views/widget/native_widget_aura.cc

Issue 1406403007: Eliminate HICON leaks caused by creating icons from bitmap image. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Use ScopedHICON instead of HICON. Created 5 years, 1 month 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
OLDNEW
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 "ui/views/widget/native_widget_aura.h" 5 #include "ui/views/widget/native_widget_aura.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/strings/string_util.h" 8 #include "base/strings/string_util.h"
9 #include "third_party/skia/include/core/SkRegion.h" 9 #include "third_party/skia/include/core/SkRegion.h"
10 #include "ui/aura/client/aura_constants.h" 10 #include "ui/aura/client/aura_constants.h"
(...skipping 1144 matching lines...) Expand 10 before | Expand all | Expand 10 after
1155 return aura::Env::GetInstance()->IsMouseButtonDown(); 1155 return aura::Env::GetInstance()->IsMouseButtonDown();
1156 } 1156 }
1157 1157
1158 // static 1158 // static
1159 gfx::FontList NativeWidgetPrivate::GetWindowTitleFontList() { 1159 gfx::FontList NativeWidgetPrivate::GetWindowTitleFontList() {
1160 #if defined(OS_WIN) 1160 #if defined(OS_WIN)
1161 NONCLIENTMETRICS_XP ncm; 1161 NONCLIENTMETRICS_XP ncm;
1162 base::win::GetNonClientMetrics(&ncm); 1162 base::win::GetNonClientMetrics(&ncm);
1163 l10n_util::AdjustUIFont(&(ncm.lfCaptionFont)); 1163 l10n_util::AdjustUIFont(&(ncm.lfCaptionFont));
1164 base::win::ScopedHFONT caption_font(CreateFontIndirect(&(ncm.lfCaptionFont))); 1164 base::win::ScopedHFONT caption_font(CreateFontIndirect(&(ncm.lfCaptionFont)));
1165 return gfx::FontList(gfx::Font(caption_font)); 1165 return gfx::FontList(gfx::Font(caption_font.get()));
1166 #else 1166 #else
1167 return gfx::FontList(); 1167 return gfx::FontList();
1168 #endif 1168 #endif
1169 } 1169 }
1170 1170
1171 } // namespace internal 1171 } // namespace internal
1172 } // namespace views 1172 } // namespace views
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698