%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+)
MAJOR=7
MINOR=36
-BUILD=149
+BUILD=151
PATCH=0
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',
#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"
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;
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<std::string> 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;
}
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);
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);
// 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();
}
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())
// 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();
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";
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[];
content::TitleWatcher title_watcher(runtime()->web_contents(), passString);
title_watcher.AlsoWaitForTitle(failString);
+#if defined(OS_LINUX)
// create "<tmp>/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);
void DoTask();
private:
+ friend class base::RefCountedThreadSafe<FileSystemChecker>;
+ virtual ~FileSystemChecker() {}
void RegisterFileSystemsAndSendResponse();
int process_id_;
--- /dev/null
+// 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();
+}
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':
%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+)
* @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));
}
#include <string>
#include "base/command_line.h"
+#include "base/cpu.h"
#include "base/file_util.h"
#include "base/files/file_path.h"
#include "base/logging.h"
}
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();
}
'../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',