summaryrefslogtreecommitdiffstats
path: root/chrome_frame/chrome_frame_activex_base.h
diff options
context:
space:
mode:
authorgrt@chromium.org <grt@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-10-20 14:01:21 +0000
committergrt@chromium.org <grt@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-10-20 14:01:21 +0000
commit6ae3d4909757757f27940369e1bdc67eebd52b87 (patch)
treeb95726d81214d6824646008e53d870d0ee8f2feb /chrome_frame/chrome_frame_activex_base.h
parentb85e5120573c61b9bdd492fb903b334bf1119d8f (diff)
downloadchromium_src-6ae3d4909757757f27940369e1bdc67eebd52b87.zip
chromium_src-6ae3d4909757757f27940369e1bdc67eebd52b87.tar.gz
chromium_src-6ae3d4909757757f27940369e1bdc67eebd52b87.tar.bz2
Various changes to make GCF nicer for the non-en-US world:
- Chrome Frame now uses MUI on Vista+ to detect IE's UX language. - Chrome Frame now tells Chrome (via the --lang command-line option) what the current langauge is. - Chrome Frame now respects Chrome's "ApplicationLocaleValue" group policy setting. BUG=56435,59582 TEST=chrome_frame_unittests and chrome_frame_tests updated Review URL: http://codereview.chromium.org/3757007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@63208 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome_frame/chrome_frame_activex_base.h')
-rw-r--r--chrome_frame/chrome_frame_activex_base.h17
1 files changed, 14 insertions, 3 deletions
diff --git a/chrome_frame/chrome_frame_activex_base.h b/chrome_frame/chrome_frame_activex_base.h
index 264621f..5f063c8 100644
--- a/chrome_frame/chrome_frame_activex_base.h
+++ b/chrome_frame/chrome_frame_activex_base.h
@@ -177,7 +177,8 @@ class ATL_NO_VTABLE ChromeFrameActivexBase : // NOLINT
: ready_state_(READYSTATE_UNINITIALIZED),
url_fetcher_(new UrlmonUrlRequestManager()),
failed_to_fetch_in_place_frame_(false),
- draw_sad_tab_(false) {
+ draw_sad_tab_(false),
+ prev_resource_instance_(NULL) {
m_bWindowOnly = TRUE;
url_fetcher_->set_container(static_cast<IDispatch*>(this));
}
@@ -244,10 +245,16 @@ END_MSG_MAP()
DECLARE_PROTECT_FINAL_CONSTRUCT()
virtual void SetResourceModule() {
+ DCHECK(NULL == prev_resource_instance_);
SimpleResourceLoader* loader_instance = SimpleResourceLoader::instance();
DCHECK(loader_instance);
- HINSTANCE res_dll = loader_instance->GetResourceModuleHandle();
- _AtlBaseModule.SetResourceInstance(res_dll);
+ HMODULE res_dll = loader_instance->GetResourceModuleHandle();
+ prev_resource_instance_ = _AtlBaseModule.SetResourceInstance(res_dll);
+ }
+
+ virtual void ClearResourceModule() {
+ _AtlBaseModule.SetResourceInstance(prev_resource_instance_);
+ prev_resource_instance_ = NULL;
}
HRESULT FinalConstruct() {
@@ -272,6 +279,8 @@ END_MSG_MAP()
void FinalRelease() {
Uninitialize();
+
+ ClearResourceModule();
}
void ResetUrlRequestManager() {
@@ -1243,6 +1252,8 @@ END_MSG_MAP()
// Handle network requests when host network stack is used. Passed to the
// automation client on initialization.
scoped_ptr<UrlmonUrlRequestManager> url_fetcher_;
+
+ HINSTANCE prev_resource_instance_;
};
#endif // CHROME_FRAME_CHROME_FRAME_ACTIVEX_BASE_H_