| 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 "skia/ext/image_operations.h" | 10 #include "skia/ext/image_operations.h" |
| 11 #include "ui/base/layout.h" | 11 #include "ui/base/layout.h" |
| 12 #include "ui/base/resource/resource_bundle.h" | 12 #include "ui/base/resource/resource_bundle.h" |
| 13 #include "ui/base/resource/resource_data_dll_win.h" | 13 #include "ui/base/resource/resource_data_dll_win.h" |
| 14 #include "ui/gfx/geometry/size_conversions.h" | 14 #include "ui/gfx/geometry/size_conversions.h" |
| 15 #include "ui/gfx/image/image_skia.h" | 15 #include "ui/gfx/image/image_skia.h" |
| 16 #include "ui/gfx/image/image_skia_source.h" | 16 #include "ui/gfx/image/image_skia_source.h" |
| 17 #include "ui/gfx/win/dpi.h" | |
| 18 | 17 |
| 19 namespace ui { | 18 namespace ui { |
| 20 | 19 |
| 21 namespace { | 20 namespace { |
| 22 | 21 |
| 23 HINSTANCE resources_data_dll; | 22 HINSTANCE resources_data_dll; |
| 24 | 23 |
| 25 HINSTANCE GetCurrentResourceDLL() { | 24 HINSTANCE GetCurrentResourceDLL() { |
| 26 if (resources_data_dll) | 25 if (resources_data_dll) |
| 27 return resources_data_dll; | 26 return resources_data_dll; |
| (...skipping 17 matching lines...) Expand all Loading... |
| 45 | 44 |
| 46 void SetResourcesDataDLL(HINSTANCE handle) { | 45 void SetResourcesDataDLL(HINSTANCE handle) { |
| 47 resources_data_dll = handle; | 46 resources_data_dll = handle; |
| 48 } | 47 } |
| 49 | 48 |
| 50 HICON LoadThemeIconFromResourcesDataDLL(int icon_id) { | 49 HICON LoadThemeIconFromResourcesDataDLL(int icon_id) { |
| 51 return ::LoadIcon(GetCurrentResourceDLL(), MAKEINTRESOURCE(icon_id)); | 50 return ::LoadIcon(GetCurrentResourceDLL(), MAKEINTRESOURCE(icon_id)); |
| 52 } | 51 } |
| 53 | 52 |
| 54 } // namespace ui; | 53 } // namespace ui; |
| OLD | NEW |