Call ResourceBundle::CleanupSharedInstance() on exit (issue #393).
git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@348 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
parent
e6c93810c8
commit
1897d14214
|
@ -40,7 +40,7 @@ using WebKit::WebFrameImpl;
|
||||||
|
|
||||||
namespace webkit_glue {
|
namespace webkit_glue {
|
||||||
|
|
||||||
void InitializeDataPak(const std::string& locale) {
|
void InitializeResourceBundle(const std::string& locale) {
|
||||||
// Load chrome.pak (on Mac) and the appropiate locale pack.
|
// Load chrome.pak (on Mac) and the appropiate locale pack.
|
||||||
const std::string loaded_locale =
|
const std::string loaded_locale =
|
||||||
ResourceBundle::InitSharedInstance(locale);
|
ResourceBundle::InitSharedInstance(locale);
|
||||||
|
@ -59,6 +59,10 @@ void InitializeDataPak(const std::string& locale) {
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void CleanupResourceBundle() {
|
||||||
|
ResourceBundle::CleanupSharedInstance();
|
||||||
|
}
|
||||||
|
|
||||||
string16 GetLocalizedString(int message_id) {
|
string16 GetLocalizedString(int message_id) {
|
||||||
return ResourceBundle::GetSharedInstance().GetLocalizedString(message_id);
|
return ResourceBundle::GetSharedInstance().GetLocalizedString(message_id);
|
||||||
}
|
}
|
||||||
|
|
|
@ -35,7 +35,8 @@ void CaptureWebViewBitmap(HWND mainWnd, WebKit::WebView* webview,
|
||||||
BOOL SaveBitmapToFile(HBITMAP hBmp, HDC hDC, LPCTSTR file, LPBYTE lpBits);
|
BOOL SaveBitmapToFile(HBITMAP hBmp, HDC hDC, LPCTSTR file, LPBYTE lpBits);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
void InitializeDataPak(const std::string& locale);
|
void InitializeResourceBundle(const std::string& locale);
|
||||||
|
void CleanupResourceBundle();
|
||||||
|
|
||||||
#if defined(OS_MACOSX)
|
#if defined(OS_MACOSX)
|
||||||
FilePath GetResourcesFilePath();
|
FilePath GetResourcesFilePath();
|
||||||
|
|
|
@ -89,7 +89,7 @@ void CefProcessUIThread::Init() {
|
||||||
std::string localeStr = CefString(&settings.locale);
|
std::string localeStr = CefString(&settings.locale);
|
||||||
if (localeStr.empty())
|
if (localeStr.empty())
|
||||||
localeStr = "en-US";
|
localeStr = "en-US";
|
||||||
webkit_glue::InitializeDataPak(localeStr);
|
webkit_glue::InitializeResourceBundle(localeStr);
|
||||||
|
|
||||||
PlatformInit();
|
PlatformInit();
|
||||||
|
|
||||||
|
@ -201,6 +201,8 @@ void CefProcessUIThread::CleanUp() {
|
||||||
network_change_notifier_.reset();
|
network_change_notifier_.reset();
|
||||||
|
|
||||||
PlatformCleanUp();
|
PlatformCleanUp();
|
||||||
|
|
||||||
|
webkit_glue::CleanupResourceBundle();
|
||||||
}
|
}
|
||||||
|
|
||||||
void CefProcessUIThread::OnOnlineStateChanged(bool online) {
|
void CefProcessUIThread::OnOnlineStateChanged(bool online) {
|
||||||
|
|
Loading…
Reference in New Issue