From: Eurogiciel-BOT Date: Tue, 10 Jun 2014 09:14:43 +0000 (+0000) Subject: Upstream version 7.36.151.0 X-Git-Tag: submit/tizen_common/20140610.145444~1 X-Git-Url: http://review.tizen.org/git/?p=platform%2Fframework%2Fweb%2Fcrosswalk.git;a=commitdiff_plain;h=5f0a9ac2f8a73293ad6b6c9fe1acfb3e839f75b9 Upstream version 7.36.151.0 Upstream commit-id 99d93deeba21f67b6eeec4aea675b1d5fd4c3e33 Change-Id: I60442d21a6ad20773c5ba5feda4e78d2d66ca8c9 Signed-off-by: Eurogiciel-BOT --- diff --git a/packaging/crosswalk.spec b/packaging/crosswalk.spec index 2e270d4..4f8ec3c 100644 --- a/packaging/crosswalk.spec +++ b/packaging/crosswalk.spec @@ -12,7 +12,7 @@ %endif Name: crosswalk -Version: 7.36.149.0 +Version: 7.36.151.0 Release: 0 Summary: Crosswalk is an app runtime based on Chromium License: (BSD-3-Clause and LGPL-2.1+) diff --git a/src/xwalk/VERSION b/src/xwalk/VERSION index e5e103f..02a90a2 100644 --- a/src/xwalk/VERSION +++ b/src/xwalk/VERSION @@ -1,4 +1,4 @@ MAJOR=7 MINOR=36 -BUILD=149 +BUILD=151 PATCH=0 diff --git a/src/xwalk/app/tools/android/customize_launch_screen.py b/src/xwalk/app/tools/android/customize_launch_screen.py index 4626b77..fcfd4c0 100755 --- a/src/xwalk/app/tools/android/customize_launch_screen.py +++ b/src/xwalk/app/tools/android/customize_launch_screen.py @@ -164,7 +164,7 @@ def CustomizeLaunchScreen(app_manifest, sanitized_name): if not app_manifest: return False parser = ManifestJsonParser(os.path.expanduser(app_manifest)) - app_root = os.path.dirname(app_manifest) + app_root = os.path.dirname(parser.input_path) default = CustomizeByOrientation(parser, 'default', sanitized_name, app_root) portrait = CustomizeByOrientation(parser, 'portrait', diff --git a/src/xwalk/application/browser/application.cc b/src/xwalk/application/browser/application.cc index 8e45647..8f1aad2 100644 --- a/src/xwalk/application/browser/application.cc +++ b/src/xwalk/application/browser/application.cc @@ -11,6 +11,8 @@ #include "base/macros.h" #include "base/message_loop/message_loop.h" #include "base/stl_util.h" +#include "base/strings/string_split.h" +#include "base/threading/thread_restrictions.h" #include "base/values.h" #include "content/public/browser/web_contents.h" #include "content/public/browser/render_process_host.h" @@ -91,7 +93,10 @@ bool Application::Launch(const LaunchParams& launch_params) { NativeAppWindow::CreateParams params; params.net_wm_pid = launch_params.launcher_pid; - params.state = GetWindowShowState(launch_params); + if (data_->GetPackageType() == Package::WGT) + params.state = GetWindowShowStateWGT(launch_params); + else + params.state = GetWindowShowStateXPK(launch_params); runtime->AttachWindow(params); return true; @@ -128,7 +133,27 @@ GURL Application::GetStartURL(const LaunchParams& params, return GURL(); } -ui::WindowShowState Application::GetWindowShowState( +ui::WindowShowState Application::GetWindowShowStateWGT( + const LaunchParams& params) { + if (params.force_fullscreen) + return ui::SHOW_STATE_FULLSCREEN; + + const Manifest* manifest = data_->GetManifest(); + std::string view_modes_string; + if (manifest->GetString(widget_keys::kViewModesKey, &view_modes_string)) { + // FIXME: ATM only 'fullscreen' and 'windowed' values are supported. + // If the first user prefererence is 'fullscreen', set window show state + // FULLSCREEN, otherwise set the default window show state. + std::vector modes; + base::SplitString(view_modes_string, ' ', &modes); + if (!modes.empty() && modes[0] == "fullscreen") + return ui::SHOW_STATE_FULLSCREEN; + } + + return ui::SHOW_STATE_DEFAULT; +} + +ui::WindowShowState Application::GetWindowShowStateXPK( const LaunchParams& params) { if (params.force_fullscreen) return ui::SHOW_STATE_FULLSCREEN; @@ -296,7 +321,7 @@ std::string Application::GetRegisteredPermissionName( } StoredPermission Application::GetPermission(PermissionType type, - std::string& permission_name) const { + const std::string& permission_name) const { if (type == SESSION_PERMISSION) { StoredPermissionMap::const_iterator iter = permission_map_.find(permission_name); diff --git a/src/xwalk/application/browser/application.h b/src/xwalk/application/browser/application.h index 9ea52cc..8baa074 100644 --- a/src/xwalk/application/browser/application.h +++ b/src/xwalk/application/browser/application.h @@ -115,7 +115,7 @@ class Application : public Runtime::Observer, const std::string& api_name) const; StoredPermission GetPermission(PermissionType type, - std::string& permission_name) const; + const std::string& permission_name) const; bool SetPermission(PermissionType type, const std::string& permission_name, StoredPermission perm); @@ -156,7 +156,8 @@ class Application : public Runtime::Observer, // Try to extract the URL from different possible keys for entry points in the // manifest, returns it and the entry point used. GURL GetStartURL(const LaunchParams& params, LaunchEntryPoint* used); - ui::WindowShowState GetWindowShowState(const LaunchParams& params); + ui::WindowShowState GetWindowShowStateWGT(const LaunchParams& params); + ui::WindowShowState GetWindowShowStateXPK(const LaunchParams& params); GURL GetURLFromURLKey(); diff --git a/src/xwalk/application/common/application_data.cc b/src/xwalk/application/common/application_data.cc index fbe69fb..bf54bc1 100644 --- a/src/xwalk/application/common/application_data.cc +++ b/src/xwalk/application/common/application_data.cc @@ -324,7 +324,7 @@ const std::set& ApplicationData::GetEvents() const { } StoredPermission ApplicationData::GetPermission( - std::string& permission_name) const { + const std::string& permission_name) const { StoredPermissionMap::const_iterator iter = permission_map_.find(permission_name); if (iter == permission_map_.end()) diff --git a/src/xwalk/application/common/application_data.h b/src/xwalk/application/common/application_data.h index e00216a..b9063f5 100644 --- a/src/xwalk/application/common/application_data.h +++ b/src/xwalk/application/common/application_data.h @@ -125,7 +125,7 @@ class ApplicationData : public base::RefCountedThreadSafe { // Permission related. StoredPermission GetPermission( - std::string& permission_name) const; + const std::string& permission_name) const; bool SetPermission(const std::string& permission_name, StoredPermission perm); void ClearPermissions(); diff --git a/src/xwalk/application/common/application_manifest_constants.cc b/src/xwalk/application/common/application_manifest_constants.cc index 5419345..baed924 100644 --- a/src/xwalk/application/common/application_manifest_constants.cc +++ b/src/xwalk/application/common/application_manifest_constants.cc @@ -47,6 +47,7 @@ const char kXmlLangKey[] = "@lang"; const char kDefaultLocaleKey[] = "widget.@defaultlocale"; const char kNameKey[] = "widget.name.#text"; const char kVersionKey[] = "widget.@version"; +const char kViewModesKey[] = "widget.@viewmodes"; const char kWidgetKey[] = "widget"; const char kLaunchLocalPathKey[] = "widget.content.@src"; const char kWebURLsKey[] = "widget.@id"; diff --git a/src/xwalk/application/common/application_manifest_constants.h b/src/xwalk/application/common/application_manifest_constants.h index 839e2c2..ab5ff07 100644 --- a/src/xwalk/application/common/application_manifest_constants.h +++ b/src/xwalk/application/common/application_manifest_constants.h @@ -47,6 +47,7 @@ namespace application_widget_keys { extern const char kWebURLsKey[]; extern const char kWidgetKey[]; extern const char kVersionKey[]; + extern const char kViewModesKey[]; extern const char kAccessKey[]; extern const char kAccessOriginKey[]; extern const char kAccessSubdomainsKey[]; diff --git a/src/xwalk/experimental/native_file_system/native_file_system_api_browsertest.cc b/src/xwalk/experimental/native_file_system/native_file_system_api_browsertest.cc index 0ec31c2..56b80bd 100644 --- a/src/xwalk/experimental/native_file_system/native_file_system_api_browsertest.cc +++ b/src/xwalk/experimental/native_file_system/native_file_system_api_browsertest.cc @@ -20,9 +20,11 @@ IN_PROC_BROWSER_TEST_F(InProcessBrowserTest, NativeFileSystem) { content::TitleWatcher title_watcher(runtime()->web_contents(), passString); title_watcher.AlsoWaitForTitle(failString); +#if defined(OS_LINUX) // create "/Documents" path if not exists. This path will be used in this // testing to replace real home directory. VirtualRootProvider::SetTesting(true); +#endif base::FilePath test_file; PathService::Get(base::DIR_SOURCE_ROOT, &test_file); diff --git a/src/xwalk/experimental/native_file_system/native_file_system_extension.h b/src/xwalk/experimental/native_file_system/native_file_system_extension.h index 64293de..a7170fc 100644 --- a/src/xwalk/experimental/native_file_system/native_file_system_extension.h +++ b/src/xwalk/experimental/native_file_system/native_file_system_extension.h @@ -56,6 +56,8 @@ class FileSystemChecker void DoTask(); private: + friend class base::RefCountedThreadSafe; + virtual ~FileSystemChecker() {} void RegisterFileSystemsAndSendResponse(); int process_id_; diff --git a/src/xwalk/experimental/native_file_system/virtual_root_provider_mac.cc b/src/xwalk/experimental/native_file_system/virtual_root_provider_mac.cc new file mode 100644 index 0000000..77ff994 --- /dev/null +++ b/src/xwalk/experimental/native_file_system/virtual_root_provider_mac.cc @@ -0,0 +1,12 @@ +// Copyright (c) 2014 Intel Corporation. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "xwalk/experimental/native_file_system/virtual_root_provider.h" + +#include "base/logging.h" + +VirtualRootProvider::VirtualRootProvider() { + // TODO(darktears): Mac support to be added. + NOTIMPLEMENTED(); +} diff --git a/src/xwalk/gyp_xwalk b/src/xwalk/gyp_xwalk index 4868064..d4a7358 100755 --- a/src/xwalk/gyp_xwalk +++ b/src/xwalk/gyp_xwalk @@ -320,8 +320,8 @@ if __name__ == '__main__': if gyp_vars_dict.get('OS') == 'android': args.append('-Duse_openmax_dl_fft=1') - # Enable Aura by default on all platforms except Android - if gyp_vars_dict.get('OS') != 'android' and gyp_vars_dict.get('OS') != 'mac': + # Enable Aura by default on all platforms except Android and Mac. + if gyp_vars_dict.get('OS') != 'android' and sys.platform not in ('darwin',): args.append('-Duse_aura=1') if gyp_vars_dict.get('OS') == 'android': diff --git a/src/xwalk/packaging/crosswalk.spec b/src/xwalk/packaging/crosswalk.spec index 2e270d4..4f8ec3c 100644 --- a/src/xwalk/packaging/crosswalk.spec +++ b/src/xwalk/packaging/crosswalk.spec @@ -12,7 +12,7 @@ %endif Name: crosswalk -Version: 7.36.149.0 +Version: 7.36.151.0 Release: 0 Summary: Crosswalk is an app runtime based on Chromium License: (BSD-3-Clause and LGPL-2.1+) diff --git a/src/xwalk/runtime/android/core/src/org/xwalk/core/XWalkNavigationHistory.java b/src/xwalk/runtime/android/core/src/org/xwalk/core/XWalkNavigationHistory.java index 8802288..47582fc 100644 --- a/src/xwalk/runtime/android/core/src/org/xwalk/core/XWalkNavigationHistory.java +++ b/src/xwalk/runtime/android/core/src/org/xwalk/core/XWalkNavigationHistory.java @@ -49,6 +49,7 @@ public final class XWalkNavigationHistory implements Cloneable, Serializable { * @return the navigation item for the given index. */ public XWalkNavigationItem getItemAt(int index) { + if (index < 0 || index >= size()) return null; return new XWalkNavigationItem(mHistory.getEntryAtIndex(index)); } diff --git a/src/xwalk/runtime/app/android/xwalk_main_delegate_android.cc b/src/xwalk/runtime/app/android/xwalk_main_delegate_android.cc index 7fa476e..13286e4 100644 --- a/src/xwalk/runtime/app/android/xwalk_main_delegate_android.cc +++ b/src/xwalk/runtime/app/android/xwalk_main_delegate_android.cc @@ -7,6 +7,7 @@ #include #include "base/command_line.h" +#include "base/cpu.h" #include "base/file_util.h" #include "base/files/file_path.h" #include "base/logging.h" @@ -37,6 +38,11 @@ bool XWalkMainDelegateAndroid::BasicStartupComplete(int* exit_code) { } void XWalkMainDelegateAndroid::PreSandboxStartup() { +#if defined(ARCH_CPU_ARM_FAMILY) + // Create an instance of the CPU class to parse /proc/cpuinfo and cache + // cpu_brand info for ARM platform. + base::CPU cpu_info; +#endif InitResourceBundle(); } diff --git a/src/xwalk/xwalk.gyp b/src/xwalk/xwalk.gyp index 475eb9b..c2d9dd0 100644 --- a/src/xwalk/xwalk.gyp +++ b/src/xwalk/xwalk.gyp @@ -75,6 +75,7 @@ '../extensions/common/url_pattern.h', 'experimental/native_file_system/native_file_system_extension.cc', 'experimental/native_file_system/native_file_system_extension.h', + 'experimental/native_file_system/virtual_root_provider_mac.cc', 'experimental/native_file_system/virtual_root_provider.cc', 'experimental/native_file_system/virtual_root_provider.h', 'runtime/app/android/xwalk_main_delegate_android.cc',