preload_handle_[lib_path] = handle;
}
-void XWalkExtensionManager::LoadExtensionsByJsonPath(
- const std::string& json_path) {
- if (is_loaded_by_json_path_)
+void XWalkExtensionManager::LoadExtensionsByPath(const std::string& path) {
+ if (is_loaded_by_path_)
return;
- std::set<std::string> files;
- ParseMetadata(json_path, &files, XWALK_EXTENSION_PATH);
- is_loaded_by_json_path_ = true;
+ std::ignore = LoadExtensions(path);
+ is_loaded_by_path_ = true;
}
void XWalkExtensionManager::LoadUIAppExtensions() {
void ClearPreloadHandle(const std::string& lib_path);
void GetRuntimeVariable(const char* key, char* value, size_t value_len);
- void LoadExtensionsByJsonPath(const std::string& json_path);
+ void LoadExtensionsByPath(const std::string& path);
void LoadUIAppExtensions();
void LoadServiceAppExtensions();
void LoadUserExtensions(const std::string& app_path);
virtual std::string HandleRuntimeMessageInternal(
const std::string& type, const std::string& value);
- bool is_loaded_by_json_path_ = false;
+ bool is_loaded_by_path_ = false;
bool is_loaded_for_service_app_ = false;
bool is_loaded_for_web_app_ = false;
const char kEwkEnableMobileFeaturesForDesktop[] =
"ewk-enable-mobile-features-for-desktop";
-const char kXWalkExtensionJsonPath[] = "xwalk-extension-json-path";
+const char kXWalkExtensionPath[] = "xwalk-extension-path";
#if defined(TIZEN_PEPPER_EXTENSIONS)
const char kEnableTrustedPepperPlugins[] = "enable-trusted-pepper-plugins";
CONTENT_EXPORT extern const char kWidgetScale[];
CONTENT_EXPORT extern const char kWidgetTheme[];
CONTENT_EXPORT extern const char kWidgetEncodedBundle[];
-CONTENT_EXPORT extern const char kXWalkExtensionJsonPath[];
+CONTENT_EXPORT extern const char kXWalkExtensionPath[];
// Turns on a bunch of settings (mostly on blink::WebView) for which there is no
// command line switches. This allows desktop "ubrowser --mobile" to have
blink::AssociatedInterfaceRegistry* associated_registry,
content::RenderProcessHost* render_process_host) {
if (!base::CommandLine::ForCurrentProcess()->HasSwitch(
- switches::kXWalkExtensionJsonPath)) {
+ switches::kXWalkExtensionPath)) {
return;
}
#if BUILDFLAG(IS_TIZEN)
content::RegisterGpuMainThreadFactory(CreateInProcessGpuThread);
#if BUILDFLAG(IS_TIZEN)
- // switches::kXWalkExtensionJsonPath SHOULD be set before MainDelegate init.
- auto json_path =
+ // switches::kXWalkExtensionPath SHOULD be set before MainDelegate init.
+ auto extension_path =
base::CommandLine::ForCurrentProcess()->GetSwitchValueASCII(
- switches::kXWalkExtensionJsonPath);
- if (!json_path.empty()) {
+ switches::kXWalkExtensionPath);
+ if (!extension_path.empty()) {
auto* extension_manager = wrt::XWalkExtensionManager::GetInstance();
- extension_manager->LoadExtensionsByJsonPath(json_path);
+ extension_manager->LoadExtensionsByPath(extension_path);
extension_manager->PreloadExtensions();
extension_manager->SetDelegate(
std::make_unique<XWalkExtensionBrowserEfl>());
bool ShouldRegisterXWalkExtension(int world_id) {
return world_id == 0 && base::CommandLine::ForCurrentProcess()->HasSwitch(
- switches::kXWalkExtensionJsonPath);
+ switches::kXWalkExtensionPath);
}
#if defined(TIZEN_PEPPER_EXTENSIONS)
LocaleEfl::Initialize();
#if BUILDFLAG(IS_TIZEN)
- if (command_line.HasSwitch(switches::kXWalkExtensionJsonPath)) {
+ if (command_line.HasSwitch(switches::kXWalkExtensionPath)) {
wrt::XWalkExtensionRendererController::GetInstance().SetPrivilegeChecker(
base::BindRepeating([]() -> bool {
// TODO(dh81.song)