OLD | NEW |
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/base/resource/resource_bundle_win.h" | 5 #include "ui/base/resource/resource_bundle_win.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "base/path_service.h" | 8 #include "base/path_service.h" |
9 #include "base/strings/utf_string_conversions.h" | 9 #include "base/strings/utf_string_conversions.h" |
10 #include "ui/base/layout.h" | 10 #include "ui/base/layout.h" |
11 #include "ui/base/resource/resource_bundle.h" | 11 #include "ui/base/resource/resource_bundle.h" |
12 #include "ui/base/resource/resource_data_dll_win.h" | 12 #include "ui/base/resource/resource_data_dll_win.h" |
13 #include "ui/gfx/dpi_win.h" | 13 #include "ui/gfx/win/dpi.h" |
14 | 14 |
15 namespace ui { | 15 namespace ui { |
16 | 16 |
17 namespace { | 17 namespace { |
18 | 18 |
19 HINSTANCE resources_data_dll; | 19 HINSTANCE resources_data_dll; |
20 | 20 |
21 HINSTANCE GetCurrentResourceDLL() { | 21 HINSTANCE GetCurrentResourceDLL() { |
22 if (resources_data_dll) | 22 if (resources_data_dll) |
23 return resources_data_dll; | 23 return resources_data_dll; |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
81 | 81 |
82 void SetResourcesDataDLL(HINSTANCE handle) { | 82 void SetResourcesDataDLL(HINSTANCE handle) { |
83 resources_data_dll = handle; | 83 resources_data_dll = handle; |
84 } | 84 } |
85 | 85 |
86 HICON LoadThemeIconFromResourcesDataDLL(int icon_id) { | 86 HICON LoadThemeIconFromResourcesDataDLL(int icon_id) { |
87 return ::LoadIcon(GetCurrentResourceDLL(), MAKEINTRESOURCE(icon_id)); | 87 return ::LoadIcon(GetCurrentResourceDLL(), MAKEINTRESOURCE(icon_id)); |
88 } | 88 } |
89 | 89 |
90 } // namespace ui; | 90 } // namespace ui; |
OLD | NEW |