Upstream version 9.38.207.0
[platform/framework/web/crosswalk.git] / src / xwalk / application / browser / application_system.cc
index ce1544c..740fc3a 100644 (file)
@@ -92,11 +92,8 @@ bool ApplicationSystem::LaunchFromCommandLine(
     return true;
   }
 
-  if (base::DirectoryExists(path)) {  // Handles unpacked application.
-    run_default_message_loop = application_service_->LaunchFromUnpackedPath(
-        path, launch_params(cmd_line));
-    return true;
-  }
+  if (!base::PathExists(path))
+    return false;
 
   if (path.MatchesExtension(FILE_PATH_LITERAL(".xpk")) ||
       path.MatchesExtension(FILE_PATH_LITERAL(".wgt"))) {
@@ -105,6 +102,18 @@ bool ApplicationSystem::LaunchFromCommandLine(
     return true;
   }
 
+  if (path.MatchesExtension(FILE_PATH_LITERAL(".json"))) {
+    run_default_message_loop = application_service_->LaunchFromManifestPath(
+        path, Manifest::TYPE_MANIFEST, launch_params(cmd_line));
+    return true;
+  }
+
+  if (path.MatchesExtension(FILE_PATH_LITERAL(".xml"))) {
+    run_default_message_loop = application_service_->LaunchFromManifestPath(
+        path, Manifest::TYPE_WIDGET, launch_params(cmd_line));
+    return true;
+  }
+
   return false;
 }