Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(315)

Unified Diff: chromecast/shell/app/cast_main_delegate.cc

Issue 467043002: Adds locale strings to Chromecast build. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: remove build/gyp_chromium Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chromecast/shell/app/cast_main_delegate.cc
diff --git a/chromecast/shell/app/cast_main_delegate.cc b/chromecast/shell/app/cast_main_delegate.cc
index 87c5fbf69536c7c453f66da39f5db79f19de10f5..e72976b0ee33e28e8a4a0f9657f6855dd647aba4 100644
--- a/chromecast/shell/app/cast_main_delegate.cc
+++ b/chromecast/shell/app/cast_main_delegate.cc
@@ -8,6 +8,7 @@
#include "base/logging.h"
#include "base/path_service.h"
#include "chromecast/common/cast_paths.h"
+#include "chromecast/common/cast_resource_delegate.h"
#include "chromecast/shell/browser/cast_content_browser_client.h"
#include "chromecast/shell/renderer/cast_content_renderer_client.h"
#include "content/public/common/content_switches.h"
@@ -42,15 +43,19 @@ void CastMainDelegate::PreSandboxStartup() {
void CastMainDelegate::ZygoteForked() {
}
-// static
void CastMainDelegate::InitializeResourceBundle() {
+ resource_delegate_.reset(new CastResourceDelegate());
+ // TODO(gunsch): Use InitSharedInstanceWithLocale once ResourceBundle no
+ // longer hardcodes resource file names.
+ ui::ResourceBundle::InitSharedInstanceLocaleOnly("en-US",
+ resource_delegate_.get());
byungchul 2014/08/14 20:34:11 wrong indentation
gunsch 2014/08/15 00:04:27 Done.
+
base::FilePath pak_file;
byungchul 2014/08/14 20:34:11 define at line 56
gunsch 2014/08/15 00:04:27 Done.
base::FilePath pak_dir;
-
PathService::Get(base::DIR_MODULE, &pak_dir);
-
pak_file = pak_dir.Append(FILE_PATH_LITERAL("cast_shell.pak"));
- ui::ResourceBundle::InitSharedInstanceWithPakPath(pak_file);
+ ui::ResourceBundle::GetSharedInstance().AddDataPackFromPath(pak_file,
+ ui::SCALE_FACTOR_NONE);
byungchul 2014/08/14 20:34:11 wrong indentation.
gunsch 2014/08/15 00:04:27 Done.
}
content::ContentBrowserClient* CastMainDelegate::CreateContentBrowserClient() {

Powered by Google App Engine
This is Rietveld 408576698