<request>
<domain name="_"/>
</request>
-</manifest>
\ No newline at end of file
+ <assign>
+ <filesystem path="/usr/bin/xwalk" exec_label="User" />
+ <filesystem path="/usr/bin/xwalkctl" exec_label="User" />
+ <filesystem path="/usr/bin/xwalk-launcher" exec_label="User" />
+ <filesystem path="/usr/bin/xwalk-pkg-helper" exec_label="User" />
+ </assign>
+</manifest>
%endif
Name: crosswalk
-Version: 7.35.141.0
+Version: 7.35.143.0
Release: 0
Summary: Crosswalk is an app runtime based on Chromium
License: (BSD-3-Clause and LGPL-2.1+)
'enable_xdg_shell%': '<(enable_xdg_shell)',
'conditions': [
['sysroot!=""', {
- 'pkg-config': './pkg-config-wrapper "<(sysroot)" "<(target_arch)"',
+ 'pkg-config': '../../build/linux/pkg-config-wrapper "<(sysroot)" "<(target_arch)"',
}, {
'pkg-config': 'pkg-config'
}],
chromium_crosswalk_point = 'e76fa1eeaea6745b72a693cf746e5d3d8ece1bef'
blink_crosswalk_point = '3cf743afc1a77a1141f08897c4f2c3b805124f25'
v8_crosswalk_point = '64b8b78dee87a9d465f9d095e2021bdb9d45d37d'
-ozone_wayland_point = 'f4faec532d7d2f482b3ffe1e52be6fa3e6fc8629'
+ozone_wayland_point = '55f39c62b461b92d3b0b912c7c80ae98d866b5a6'
deps_xwalk = {
'src': 'https://github.com/crosswalk-project/chromium-crosswalk.git@%s' % chromium_crosswalk_point,
MAJOR=7
MINOR=35
-BUILD=141
+BUILD=143
PATCH=0
'../../../..',
],
'sources': [
- 'dbus_connection.h',
'dbus_connection.cc',
- 'xwalk_tizen_user.h',
- 'xwalk_tizen_user.cc',
+ 'dbus_connection.h',
'xwalkctl_main.cc',
],
+ 'conditions' : [
+ ['tizen==1', {
+ 'sources': [
+ 'xwalk_tizen_user.cc',
+ 'xwalk_tizen_user.h',
+ ],
+ }],
+ ],
},
{
'target_name': 'xwalk_launcher',
'../../../extensions/extensions.gyp:xwalk_extensions',
],
'sources': [
- 'dbus_connection.h',
'dbus_connection.cc',
- 'xwalk_extension_process_launcher.h',
+ 'dbus_connection.h',
'xwalk_extension_process_launcher.cc',
- 'xwalk_tizen_user.h',
- 'xwalk_tizen_user.cc',
+ 'xwalk_extension_process_launcher.h',
'xwalk_launcher_main.cc',
],
'conditions' : [
'sources': [
'xwalk_launcher_tizen.cc',
'xwalk_launcher_tizen.h',
+ 'xwalk_tizen_user.cc',
+ 'xwalk_tizen_user.h',
],
}],
],
#include "xwalk/application/tools/linux/dbus_connection.h"
#include "xwalk/application/tools/linux/xwalk_extension_process_launcher.h"
+#if defined(OS_TIZEN)
#include "xwalk/application/tools/linux/xwalk_launcher_tizen.h"
#include "xwalk/application/tools/linux/xwalk_tizen_user.h"
+#endif
static const char* xwalk_service_name = "org.crosswalkproject.Runtime1";
static const char* xwalk_running_path = "/running1";
g_type_init();
#endif
+#if defined(OS_TIZEN)
if (xwalk_tizen_check_user_app())
exit(1);
+#endif
GOptionContext* context =
g_option_context_new("- Crosswalk Application Launcher");
#include <locale.h>
#include "xwalk/application/tools/linux/dbus_connection.h"
+#if defined(OS_TIZEN)
#include "xwalk/application/tools/linux/xwalk_tizen_user.h"
+#endif
static const char* xwalk_service_name = "org.crosswalkproject.Runtime1";
static const char* xwalk_installed_path = "/installed1";
g_type_init();
#endif
+#if defined(OS_TIZEN)
if (xwalk_tizen_check_user_app())
exit(1);
+#endif
context = g_option_context_new("- Crosswalk Application Management");
g_option_context_add_main_entries(context, entries, NULL);
<request>
<domain name="_"/>
</request>
-</manifest>
\ No newline at end of file
+ <assign>
+ <filesystem path="/usr/bin/xwalk" exec_label="User" />
+ <filesystem path="/usr/bin/xwalkctl" exec_label="User" />
+ <filesystem path="/usr/bin/xwalk-launcher" exec_label="User" />
+ <filesystem path="/usr/bin/xwalk-pkg-helper" exec_label="User" />
+ </assign>
+</manifest>
%endif
Name: crosswalk
-Version: 7.35.141.0
+Version: 7.35.143.0
Release: 0
Summary: Crosswalk is an app runtime based on Chromium
License: (BSD-3-Clause and LGPL-2.1+)
import org.chromium.content.browser.ContentView;
import org.chromium.content.browser.ContentViewCore;
import org.chromium.content.browser.ContentViewRenderView;
+import org.chromium.content.browser.ContentViewRenderView.CompositingSurfaceType;
import org.chromium.content.browser.ContentViewStatics;
import org.chromium.content.browser.LoadUrlParams;
import org.chromium.content.browser.NavigationHistory;
mWindow = new ActivityWindowAndroid(xwView.getActivity());
// Initialize ContentViewRenderView
- mContentViewRenderView = new ContentViewRenderView(context, mWindow) {
+ boolean animated = XWalkPreferences.getValue(XWalkPreferences.ANIMATABLE_XWALK_VIEW);
+ CompositingSurfaceType surfaceType =
+ animated ? CompositingSurfaceType.TEXTURE_VIEW : CompositingSurfaceType.SURFACE_VIEW;
+ mContentViewRenderView = new ContentViewRenderView(context, mWindow, surfaceType) {
protected void onReadyToRender() {
if (mPendingUrl != null) {
doLoadUrl(mPendingUrl, mPendingData);
*/
public static final String REMOTE_DEBUGGING = "remote-debugging";
+ /**
+ * The key string to enable/disable animatable XWalkView. Default value is
+ * false.
+ *
+ * If this key is set to True, the XWalkView created by Crosswalk can be
+ * transformed and animated. Internally, Crosswalk is alternatively using
+ * TextureView as the backend of XWalkView.
+ *
+ * <a href="http://developer.android.com/reference/android/view/TextureView.html">
+ * TextureView</a> is a kind of
+ * <a href="http://developer.android.com/reference/android/view/View.html">
+ * android.view.View</a> that is different from
+ * <a href="http://developer.android.com/reference/android/view/SurfaceView.html">
+ * SurfaceView</a>. Unlike SurfaceView, it can be resized, transformed and
+ * animated. Once this key is set to True, all XWalkView will use TextureView
+ * as the rendering target instead of SurfaceView. The downside of TextureView
+ * is, it would consume more graphics memory than SurfaceView and may have
+ * 1~3 extra frames of latency to display updates.
+ *
+ * Note this key MUST be set before creating the first XWalkView, otherwise
+ * a RuntimeException will be thrown.
+ */
+ public static final String ANIMATABLE_XWALK_VIEW = "animatable-xwalk-view";
+
static {
sPrefMap.put(REMOTE_DEBUGGING, Boolean.FALSE);
+ sPrefMap.put(ANIMATABLE_XWALK_VIEW, Boolean.FALSE);
}
/**
*/
public static synchronized void setValue(String key, boolean enabled) throws RuntimeException {
checkKey(key);
+ // If the listener list is not empty, we consider the preference is
+ // loaded by Crosswalk and taken effect already.
+ if (key == ANIMATABLE_XWALK_VIEW && !sListeners.isEmpty()) {
+ throw new RuntimeException("Warning: the preference key " + key +
+ " can not be set if the preference is already loaded by Crosswalk");
+ }
if (sPrefMap.get(key) != enabled) {
sPrefMap.put(key, new Boolean(enabled));
onKeyValueChanged(key, enabled);
* <p>XWalkView represents an Android view for web apps/pages. Thus most of attributes
* for Android view are valid for this class. Since it internally uses
* <a href="http://developer.android.com/reference/android/view/SurfaceView.html">
- * android.view.SurfaceView</a> for rendering web pages, it can't be resized, rotated,
- * transformed and animated due to the limitations of SurfaceView. Besides, XWalkView won't
- * be rendered if it's invisible.</p>
+ * android.view.SurfaceView</a> for rendering web pages by default, it can't be resized,
+ * rotated, transformed and animated due to the limitations of SurfaceView.
+ * Alternatively, if the preference key {@link XWalkPreferences#ANIMATABLE_XWALK_VIEW}
+ * is set to True, XWalkView can be transformed and animated because
+ * <a href="http://developer.android.com/reference/android/view/TextureView.html">
+ * TextureView</a> is intentionally used to render web pages for animation support.
+ * Besides, XWalkView won't be rendered if it's invisible.</p>
*
* <p>XWalkView needs hardware acceleration to render web pages. As a result, the
* AndroidManifest.xml of the caller's app must be appended with the attribute
*/
// TODO(yongsheng): make it static?
public String getAPIVersion() {
- return "1.0";
+ return "2.0";
}
/**
<category android:name="android.intent.category.SAMPLE_CODE" />
</intent-filter>
</activity>
+ <activity
+ android:name=".AnimatableXWalkViewActivity"
+ android:label="Animatable XWalkView"
+ android:parentActivityName=".XWalkEmbeddedAPISample" >
+ <intent-filter>
+ <action android:name="android.intent.action.MAIN" />
+ <category android:name="android.intent.category.SAMPLE_CODE" />
+ </intent-filter>
+ </activity>
</application>
</manifest>
--- /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.
+-->
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:orientation="vertical">
+ <Button android:id="@+id/run_animation"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:gravity="right"
+ android:text="Run Animation" />
+
+ <org.xwalk.core.XWalkView xmlns:android="http://schemas.android.com/apk/res/android"
+ android:id="@+id/xwalkview"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent" >
+ </org.xwalk.core.XWalkView>
+
+</LinearLayout>
--- /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.
+
+package org.xwalk.core.sample;
+
+import org.xwalk.core.XWalkView;
+import org.xwalk.core.XWalkPreferences;
+
+import android.animation.Animator;
+import android.animation.AnimatorListenerAdapter;
+import android.animation.AnimatorSet;
+import android.animation.ObjectAnimator;
+import android.app.Activity;
+import android.os.Bundle;
+import android.widget.Button;
+import android.widget.LinearLayout;
+import android.view.View;
+
+/**
+ * Sample code to show how to use ANIMATED_XWALK_VIEW preference key to create
+ * animated XWalkView and apply alpha animation or scale animation on it.
+ */
+public class AnimatableXWalkViewActivity extends XWalkBaseActivity {
+ private final static float ANIMATION_FACTOR = 0.6f;
+ private Button mRunAnimationButton;
+
+ private void startAnimation() {
+ AnimatorSet combo = new AnimatorSet();
+
+ float targetAlpha = mXWalkView.getAlpha() == 1.f ? ANIMATION_FACTOR : 1.f;
+ float targetScaleFactor = mXWalkView.getScaleX() == 1.f ? ANIMATION_FACTOR : 1.f;
+
+ ObjectAnimator fade = ObjectAnimator.ofFloat(mXWalkView,
+ "alpha", mXWalkView.getAlpha(), targetAlpha);
+ ObjectAnimator scaleX = ObjectAnimator.ofFloat(mXWalkView,
+ "scaleX", mXWalkView.getScaleX(), targetScaleFactor);
+ ObjectAnimator scaleY = ObjectAnimator.ofFloat(mXWalkView,
+ "scaleY", mXWalkView.getScaleY(), targetScaleFactor);
+
+ combo.setDuration(400);
+ combo.playTogether(fade, scaleX, scaleY);
+ combo.start();
+ }
+
+ @Override
+ protected void onCreate(Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+
+ // ANIMATABLE_XWALK_VIEW preference key MUST be set before XWalkView creation.
+ XWalkPreferences.setValue(XWalkPreferences.ANIMATABLE_XWALK_VIEW, true);
+
+ setContentView(R.layout.animatable_xwview_layout);
+
+ mRunAnimationButton = (Button) findViewById(R.id.run_animation);
+ mRunAnimationButton.setOnClickListener(new View.OnClickListener() {
+ @Override
+ public void onClick(View v) {
+ startAnimation();
+ }
+ });
+
+ mXWalkView = (XWalkView) findViewById(R.id.xwalkview);
+ mXWalkView.load("http://www.baidu.com", null);
+ }
+
+ @Override
+ public void onDestroy() {
+ super.onDestroy();
+
+ // Reset the preference for animatable XWalkView.
+ XWalkPreferences.setValue(XWalkPreferences.ANIMATABLE_XWALK_VIEW, false);
+ }
+}
content::CookieStoreConfig::PERSISTANT_SESSION_COOKIES,
NULL, NULL);
net::CookieStore* cookie_store = content::CreateCookieStore(cookie_config);
- const char* schemes[] = {application::kApplicationScheme,
- content::kChromeDevToolsScheme};
- cookie_store->GetCookieMonster()->SetCookieableSchemes(schemes, 2);
+
+ std::vector<const char*> cookieable_schemes(
+ net::CookieMonster::kDefaultCookieableSchemes,
+ net::CookieMonster::kDefaultCookieableSchemes +
+ net::CookieMonster::kDefaultCookieableSchemesCount - 1);
+ cookieable_schemes.push_back(application::kApplicationScheme);
+ cookieable_schemes.push_back(content::kChromeDevToolsScheme);
+
+ cookie_store->GetCookieMonster()->SetCookieableSchemes(
+ &cookieable_schemes[0], cookieable_schemes.size());
storage_->set_cookie_store(cookie_store);
#endif
storage_->set_server_bound_cert_service(new net::ServerBoundCertService(