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 {
|
||||
|
||||
void InitializeDataPak(const std::string& locale) {
|
||||
void InitializeResourceBundle(const std::string& locale) {
|
||||
// Load chrome.pak (on Mac) and the appropiate locale pack.
|
||||
const std::string loaded_locale =
|
||||
ResourceBundle::InitSharedInstance(locale);
|
||||
|
@ -59,6 +59,10 @@ void InitializeDataPak(const std::string& locale) {
|
|||
#endif
|
||||
}
|
||||
|
||||
void CleanupResourceBundle() {
|
||||
ResourceBundle::CleanupSharedInstance();
|
||||
}
|
||||
|
||||
string16 GetLocalizedString(int 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);
|
||||
#endif
|
||||
|
||||
void InitializeDataPak(const std::string& locale);
|
||||
void InitializeResourceBundle(const std::string& locale);
|
||||
void CleanupResourceBundle();
|
||||
|
||||
#if defined(OS_MACOSX)
|
||||
FilePath GetResourcesFilePath();
|
||||
|
|
|
@ -89,7 +89,7 @@ void CefProcessUIThread::Init() {
|
|||
std::string localeStr = CefString(&settings.locale);
|
||||
if (localeStr.empty())
|
||||
localeStr = "en-US";
|
||||
webkit_glue::InitializeDataPak(localeStr);
|
||||
webkit_glue::InitializeResourceBundle(localeStr);
|
||||
|
||||
PlatformInit();
|
||||
|
||||
|
@ -201,6 +201,8 @@ void CefProcessUIThread::CleanUp() {
|
|||
network_change_notifier_.reset();
|
||||
|
||||
PlatformCleanUp();
|
||||
|
||||
webkit_glue::CleanupResourceBundle();
|
||||
}
|
||||
|
||||
void CefProcessUIThread::OnOnlineStateChanged(bool online) {
|
||||
|
|
Loading…
Reference in New Issue