Commit 787c167b authored by gunsch@chromium.org's avatar gunsch@chromium.org

Chromecast: moves cast_shell.pak output to assets/ directory.

R=byungchul@chromium.org,lcwu@chromium.org
BUG=403966

Review URL: https://codereview.chromium.org/469023004

Cr-Commit-Position: refs/heads/master@{#290078}
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@290078 0039d316-1c4b-4281-b951-d872f2087c98
parent ed554d87
...@@ -117,7 +117,7 @@ ...@@ -117,7 +117,7 @@
'<(SHARED_INTERMEDIATE_DIR)/webkit/devtools_resources.pak', '<(SHARED_INTERMEDIATE_DIR)/webkit/devtools_resources.pak',
'<(SHARED_INTERMEDIATE_DIR)/webkit/webkit_resources_100_percent.pak', '<(SHARED_INTERMEDIATE_DIR)/webkit/webkit_resources_100_percent.pak',
], ],
'pak_output': '<(PRODUCT_DIR)/cast_shell.pak', 'pak_output': '<(PRODUCT_DIR)/assets/cast_shell.pak',
}, },
'includes': [ '../build/repack_action.gypi' ], 'includes': [ '../build/repack_action.gypi' ],
}, },
......
...@@ -4,6 +4,7 @@ ...@@ -4,6 +4,7 @@
#include "chromecast/common/cast_paths.h" #include "chromecast/common/cast_paths.h"
#include "base/base_paths.h"
#include "base/file_util.h" #include "base/file_util.h"
#include "base/files/file_path.h" #include "base/files/file_path.h"
#include "base/path_service.h" #include "base/path_service.h"
...@@ -34,6 +35,17 @@ bool PathProvider(int key, base::FilePath* result) { ...@@ -34,6 +35,17 @@ bool PathProvider(int key, base::FilePath* result) {
#else #else
CHECK(PathService::Get(DIR_CAST_HOME, &data_dir)); CHECK(PathService::Get(DIR_CAST_HOME, &data_dir));
*result = data_dir.Append(".eureka.conf"); *result = data_dir.Append(".eureka.conf");
#endif // defined(OS_ANDROID)
return true;
}
case FILE_CAST_PAK: {
base::FilePath base_dir;
#if defined(OS_ANDROID)
CHECK(PathService::Get(base::DIR_ANDROID_APP_DATA, &base_dir));
*result = base_dir.Append("paks/cast_shell.pak");
#else
CHECK(PathService::Get(base::DIR_MODULE, &base_dir));
*result = base_dir.Append("assets/cast_shell.pak");
#endif // defined(OS_ANDROID) #endif // defined(OS_ANDROID)
return true; return true;
} }
......
...@@ -17,6 +17,7 @@ enum { ...@@ -17,6 +17,7 @@ enum {
// development use and the actual device. // development use and the actual device.
FILE_CAST_CONFIG, // Config/preferences file path. FILE_CAST_CONFIG, // Config/preferences file path.
FILE_CAST_PAK, // cast_shell.pak file path.
PATH_END PATH_END
}; };
......
...@@ -4,7 +4,6 @@ ...@@ -4,7 +4,6 @@
#include "chromecast/shell/app/cast_main_delegate.h" #include "chromecast/shell/app/cast_main_delegate.h"
#include "base/base_paths.h"
#include "base/logging.h" #include "base/logging.h"
#include "base/path_service.h" #include "base/path_service.h"
#include "chromecast/common/cast_paths.h" #include "chromecast/common/cast_paths.h"
...@@ -52,10 +51,10 @@ void CastMainDelegate::InitializeResourceBundle() { ...@@ -52,10 +51,10 @@ void CastMainDelegate::InitializeResourceBundle() {
resource_delegate_.get(), resource_delegate_.get(),
ui::ResourceBundle::DO_NOT_LOAD_COMMON_RESOURCES); ui::ResourceBundle::DO_NOT_LOAD_COMMON_RESOURCES);
base::FilePath pak_dir; base::FilePath pak_file;
PathService::Get(base::DIR_MODULE, &pak_dir); CHECK(PathService::Get(FILE_CAST_PAK, &pak_file));
ui::ResourceBundle::GetSharedInstance().AddDataPackFromPath( ui::ResourceBundle::GetSharedInstance().AddDataPackFromPath(
pak_dir.Append(FILE_PATH_LITERAL("cast_shell.pak")), pak_file,
ui::SCALE_FACTOR_NONE); ui::SCALE_FACTOR_NONE);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment