| 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" |
| (...skipping 19 matching lines...) Expand all Loading... |
| 30 | 30 |
| 31 } // namespace | 31 } // namespace |
| 32 | 32 |
| 33 void ResourceBundle::LoadCommonResources() { | 33 void ResourceBundle::LoadCommonResources() { |
| 34 // As a convenience, add the current resource module as a data packs. | 34 // As a convenience, add the current resource module as a data packs. |
| 35 data_packs_.push_back(new ResourceDataDLL(GetCurrentResourceDLL())); | 35 data_packs_.push_back(new ResourceDataDLL(GetCurrentResourceDLL())); |
| 36 | 36 |
| 37 LoadChromeResources(); | 37 LoadChromeResources(); |
| 38 } | 38 } |
| 39 | 39 |
| 40 gfx::Image& ResourceBundle::GetNativeImageNamed(int resource_id, ImageRTL rtl) { | 40 gfx::Image& ResourceBundle::GetNativeImageNamed(int resource_id) { |
| 41 // Flipped image is not used on Windows. | |
| 42 DCHECK_EQ(rtl, RTL_DISABLED); | |
| 43 | |
| 44 // Windows only uses SkBitmap for gfx::Image, so this is the same as | 41 // Windows only uses SkBitmap for gfx::Image, so this is the same as |
| 45 // GetImageNamed. | 42 // GetImageNamed. |
| 46 return GetImageNamed(resource_id); | 43 return GetImageNamed(resource_id); |
| 47 } | 44 } |
| 48 | 45 |
| 49 void SetResourcesDataDLL(HINSTANCE handle) { | 46 void SetResourcesDataDLL(HINSTANCE handle) { |
| 50 resources_data_dll = handle; | 47 resources_data_dll = handle; |
| 51 } | 48 } |
| 52 | 49 |
| 53 HICON LoadThemeIconFromResourcesDataDLL(int icon_id) { | 50 HICON LoadThemeIconFromResourcesDataDLL(int icon_id) { |
| 54 return ::LoadIcon(GetCurrentResourceDLL(), MAKEINTRESOURCE(icon_id)); | 51 return ::LoadIcon(GetCurrentResourceDLL(), MAKEINTRESOURCE(icon_id)); |
| 55 } | 52 } |
| 56 | 53 |
| 57 } // namespace ui; | 54 } // namespace ui; |
| OLD | NEW |