| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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/common/win_util.h" | 5 #include "chrome/common/win_util.h" |
| 6 | 6 |
| 7 #include <atlbase.h> | 7 #include <atlbase.h> |
| 8 #include <atlapp.h> | 8 #include <atlapp.h> |
| 9 #include <commdlg.h> | 9 #include <commdlg.h> |
| 10 #include <dwmapi.h> | 10 #include <dwmapi.h> |
| 11 #include <shellapi.h> | 11 #include <shellapi.h> |
| 12 #include <shlobj.h> | 12 #include <shlobj.h> |
| 13 | 13 |
| 14 #include "base/file_util.h" | 14 #include "base/file_util.h" |
| 15 #include "base/gfx/gdi_util.h" | 15 #include "base/gfx/gdi_util.h" |
| 16 #include "base/gfx/png_encoder.h" | 16 #include "base/gfx/png_encoder.h" |
| 17 #include "base/logging.h" | 17 #include "base/logging.h" |
| 18 #include "base/registry.h" | 18 #include "base/registry.h" |
| 19 #include "base/scoped_handle.h" | 19 #include "base/scoped_handle.h" |
| 20 #include "base/string_util.h" | 20 #include "base/string_util.h" |
| 21 #include "base/win_util.h" | 21 #include "base/win_util.h" |
| 22 #include "chrome/common/l10n_util.h" | 22 #include "chrome/common/l10n_util.h" |
| 23 #include "chrome/common/l10n_util_win.h" |
| 23 #include "grit/generated_resources.h" | 24 #include "grit/generated_resources.h" |
| 24 #include "net/base/mime_util.h" | 25 #include "net/base/mime_util.h" |
| 25 | 26 |
| 26 // Ensure that we pick up this link library. | 27 // Ensure that we pick up this link library. |
| 27 #pragma comment(lib, "dwmapi.lib") | 28 #pragma comment(lib, "dwmapi.lib") |
| 28 | 29 |
| 29 namespace win_util { | 30 namespace win_util { |
| 30 | 31 |
| 31 const int kAutoHideTaskbarThicknessPx = 2; | 32 const int kAutoHideTaskbarThicknessPx = 2; |
| 32 | 33 |
| (...skipping 814 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 847 const wchar_t* caption_ptr = caption.c_str(); | 848 const wchar_t* caption_ptr = caption.c_str(); |
| 848 if (l10n_util::AdjustStringForLocaleDirection(caption, &localized_caption)) | 849 if (l10n_util::AdjustStringForLocaleDirection(caption, &localized_caption)) |
| 849 caption_ptr = localized_caption.c_str(); | 850 caption_ptr = localized_caption.c_str(); |
| 850 | 851 |
| 851 return ::MessageBox(hwnd, text_ptr, caption_ptr, actual_flags); | 852 return ::MessageBox(hwnd, text_ptr, caption_ptr, actual_flags); |
| 852 } | 853 } |
| 853 | 854 |
| 854 ChromeFont GetWindowTitleFont() { | 855 ChromeFont GetWindowTitleFont() { |
| 855 NONCLIENTMETRICS ncm; | 856 NONCLIENTMETRICS ncm; |
| 856 win_util::GetNonClientMetrics(&ncm); | 857 win_util::GetNonClientMetrics(&ncm); |
| 858 l10n_util::AdjustUIFont(&(ncm.lfCaptionFont)); |
| 857 ScopedHFONT caption_font(CreateFontIndirect(&(ncm.lfCaptionFont))); | 859 ScopedHFONT caption_font(CreateFontIndirect(&(ncm.lfCaptionFont))); |
| 858 return ChromeFont::CreateFont(caption_font); | 860 return ChromeFont::CreateFont(caption_font); |
| 859 } | 861 } |
| 860 | 862 |
| 861 } // namespace win_util | 863 } // namespace win_util |
| OLD | NEW |