summaryrefslogtreecommitdiffstats
path: root/chrome_frame/simple_resource_loader.h
diff options
context:
space:
mode:
authorananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-08-26 22:26:13 +0000
committerananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-08-26 22:26:13 +0000
commit3a78fbdb6ccf439fc5d991c5b3c7ca8adc80a780 (patch)
treee3b388538d7997f07e2d409d9da1d854ded67656 /chrome_frame/simple_resource_loader.h
parentaec1d834ed08f78123cc81668fcd3b7f0d91600c (diff)
downloadchromium_src-3a78fbdb6ccf439fc5d991c5b3c7ca8adc80a780.zip
chromium_src-3a78fbdb6ccf439fc5d991c5b3c7ca8adc80a780.tar.gz
chromium_src-3a78fbdb6ccf439fc5d991c5b3c7ca8adc80a780.tar.bz2
Load both language packs and the resource dlls in ChromeFrame and look for localized strings
in the language pack and the other resources like dialogs in the dll. The latter part is done automatically by ATL. BUG=94362 TEST=No change in behavior. The resources should continue to load as before. Review URL: http://codereview.chromium.org/7763006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@98502 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome_frame/simple_resource_loader.h')
-rw-r--r--chrome_frame/simple_resource_loader.h21
1 files changed, 15 insertions, 6 deletions
diff --git a/chrome_frame/simple_resource_loader.h b/chrome_frame/simple_resource_loader.h
index 176e9a7..ceaf7f2 100644
--- a/chrome_frame/simple_resource_loader.h
+++ b/chrome_frame/simple_resource_loader.h
@@ -18,6 +18,10 @@
#include "base/gtest_prod_util.h"
#include "base/memory/singleton.h"
+namespace ui {
+class DataPack;
+} // namespace ui
+
class SimpleResourceLoader {
public:
@@ -48,15 +52,18 @@ class SimpleResourceLoader {
SimpleResourceLoader();
~SimpleResourceLoader();
- // Finds the most-preferred resource DLL for the laguages in |language_tags|
+ // Finds the most-preferred resource dll and language pack for the laguages
+ // in |language_tags|
// in |locales_path|.
//
// Returns true on success with a handle to the DLL that was loaded in
- // |dll_handle| and its path in |file_path|.
- static bool LoadLocaleDll(const std::vector<std::wstring>& language_tags,
- const FilePath& locales_path,
- HMODULE* dll_handle,
- FilePath* file_path);
+ // |dll_handle|, the data pack in |data_pack| and the locale language in
+ // the |language| parameter.
+ static bool LoadLocalePack(const std::vector<std::wstring>& language_tags,
+ const FilePath& locales_path,
+ HMODULE* dll_handle,
+ ui::DataPack** data_pack,
+ std::wstring* language);
// Returns the string resource identified by message_id from the currently
// loaded locale dll.
@@ -67,6 +74,8 @@ class SimpleResourceLoader {
FRIEND_TEST_ALL_PREFIXES(SimpleResourceLoaderTest, LoadLocaleDll);
std::wstring language_;
+ ui::DataPack* data_pack_;
+
HINSTANCE locale_dll_handle_;
};