OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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_frame/simple_resource_loader.h" | 5 #include "chrome_frame/simple_resource_loader.h" |
6 | 6 |
7 #include <atlbase.h> | 7 #include <atlbase.h> |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/base_paths.h" | 10 #include "base/base_paths.h" |
11 #include "base/file_path.h" | 11 #include "base/file_path.h" |
12 #include "base/file_util.h" | 12 #include "base/file_util.h" |
13 #include "base/path_service.h" | 13 #include "base/path_service.h" |
14 #include "base/i18n/rtl.h" | 14 #include "base/i18n/rtl.h" |
15 #include "base/string_util.h" | 15 #include "base/string_util.h" |
| 16 #include "base/utf_string_conversions.h" |
16 #include "base/win_util.h" | 17 #include "base/win_util.h" |
17 | 18 |
18 const wchar_t kLocalesDirName[] = L"Locales"; | 19 const wchar_t kLocalesDirName[] = L"Locales"; |
19 | 20 |
20 HINSTANCE SimpleResourceLoader::locale_dll_handle_; | 21 HINSTANCE SimpleResourceLoader::locale_dll_handle_; |
21 | 22 |
22 SimpleResourceLoader::SimpleResourceLoader() { | 23 SimpleResourceLoader::SimpleResourceLoader() { |
23 // Find and load the resource DLL. | 24 // Find and load the resource DLL. |
24 std::wstring locale = GetSystemLocale(); | 25 std::wstring locale = GetSystemLocale(); |
25 std::wstring locale_dll_path; | 26 std::wstring locale_dll_path; |
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
131 | 132 |
132 // static | 133 // static |
133 std::wstring SimpleResourceLoader::Get(int message_id) { | 134 std::wstring SimpleResourceLoader::Get(int message_id) { |
134 SimpleResourceLoader* loader = SimpleResourceLoader::instance(); | 135 SimpleResourceLoader* loader = SimpleResourceLoader::instance(); |
135 return loader->GetLocalizedResource(message_id); | 136 return loader->GetLocalizedResource(message_id); |
136 } | 137 } |
137 | 138 |
138 HINSTANCE SimpleResourceLoader::GetResourceModuleHandle() { | 139 HINSTANCE SimpleResourceLoader::GetResourceModuleHandle() { |
139 return locale_dll_handle_; | 140 return locale_dll_handle_; |
140 } | 141 } |
OLD | NEW |