using content::BrowserThread;
using content::WebContents;
using navigation_interception::InterceptNavigationDelegate;
+using xwalk::application_manifest_keys::kDisplay;
namespace xwalk {
// According to original proposal for "app:launch:local_path", the "http"
// and "https" schemes are supported. So |url| should do nothing when it
// already has "http" or "https" scheme.
- std::string lower_url = url;
- std::transform(lower_url.begin(), lower_url.end(),
- lower_url.begin(), std::tolower);
- if (lower_url.find(content::kHttpScheme) == std::string::npos &&
- lower_url.find(content::kHttpsScheme) == std::string::npos) {
+ std::string scheme = GURL(url).scheme();
+ if (scheme != content::kHttpScheme && scheme != content::kHttpsScheme)
url = path_str + url;
- }
} else {
manifest.GetString(
xwalk::application_manifest_keys::kLaunchWebURLKey, &url);
ScopedJavaLocalRef<jstring> url_buffer =
base::android::ConvertUTF8ToJavaString(env, url);
+ if (manifest.HasPath(kDisplay)) {
+ std::string display_string;
+ manifest.GetString(kDisplay, &display_string);
+ // TODO(David): update the handling process of the display strings
+ // including fullscreen etc.
+ bool display_as_fullscreen = (
+ display_string.find("fullscreen") != std::string::npos);
+ Java_XWalkContent_onGetFullscreenFlagFromManifest(
+ env, obj, display_as_fullscreen ? JNI_TRUE : JNI_FALSE);
+ }
+
// Check whether need to display launch screen. (Read from manifest.json)
if (manifest.HasPath(
xwalk::application_manifest_keys::kLaunchScreen)) {