Upstream version 8.36.171.0 78/24478/1
authorEurogiciel-BOT <eurogiciel.tizen@gmail.com>
Tue, 15 Jul 2014 07:56:02 +0000 (07:56 +0000)
committerEurogiciel-BOT <eurogiciel.tizen@gmail.com>
Tue, 15 Jul 2014 07:56:02 +0000 (07:56 +0000)
Upstream commit-id 94e9c1300a9608958ee671d58e4ae1e2cf160359

Change-Id: I57cf82622a298a413d2875bc64b0fa3203f29bd9
Signed-off-by: Eurogiciel-BOT <eurogiciel.tizen@gmail.com>
21 files changed:
packaging/crosswalk.spec
src/xwalk/VERSION
src/xwalk/app/tools/android/customize.py
src/xwalk/app/tools/android/make_apk.py
src/xwalk/app/tools/android/make_apk_test.py
src/xwalk/application/browser/application.cc
src/xwalk/application/browser/application_service.cc
src/xwalk/packaging/crosswalk.spec
src/xwalk/runtime/android/core/src/org/xwalk/core/XWalkView.java
src/xwalk/runtime/android/core_internal/src/org/xwalk/core/internal/XWalkViewInternal.java
src/xwalk/runtime/android/core_shell/src/org/xwalk/core/xwview/shell/XWalkViewShellActivity.java
src/xwalk/runtime/android/runtime/src/org/xwalk/runtime/XWalkCoreProviderImpl.java
src/xwalk/runtime/android/sample/src/org/xwalk/core/sample/MultiXWalkViewActivity.java
src/xwalk/runtime/android/sample/src/org/xwalk/core/sample/XWalkBaseActivity.java
src/xwalk/runtime/browser/ui/native_app_window_tizen.cc
src/xwalk/runtime/browser/ui/native_app_window_tizen.h
src/xwalk/runtime/browser/ui/splash_screen_tizen.cc [moved from src/xwalk/runtime/browser/ui/splash_screen.cc with 72% similarity]
src/xwalk/runtime/browser/ui/splash_screen_tizen.h [moved from src/xwalk/runtime/browser/ui/splash_screen.h with 74% similarity]
src/xwalk/test/android/runtime_client/javatests/src/org/xwalk/runtime/client/test/PauseResumeTest.java
src/xwalk/test/android/runtime_client_embedded/javatests/src/org/xwalk/runtime/client/embedded/test/PauseResumeTest.java
src/xwalk/xwalk.gyp

index 1c44382..9c7d449 100644 (file)
@@ -16,7 +16,7 @@
 %endif
 
 Name:           crosswalk
-Version:        8.36.169.0
+Version:        8.36.171.0
 Release:        0
 Summary:        Crosswalk is an app runtime based on Chromium
 License:        (BSD-3-Clause and LGPL-2.1+)
index 7d9fd70..18489c0 100644 (file)
@@ -1,4 +1,4 @@
 MAJOR=8
 MINOR=36
-BUILD=169
+BUILD=171
 PATCH=0
index f3ce2de..3bcc2de 100755 (executable)
@@ -445,7 +445,7 @@ def CustomizeIconByDict(name, app_root, icon_dict):
                                                'icon.' + icon_suffix))
             icon_name = 'icon'
           elif icon and (not os.path.isfile(icon)):
-            print ('Error: Please make sure \"' + icon + '\" does exist!')
+            print('Error: "%s" does not exist.' % icon)
             sys.exit(6)
           break
   return icon_name
@@ -462,7 +462,7 @@ def CustomizeIconByOption(name, icon):
     icon_name = os.path.splitext(icon_file)[0]
     return icon_name
   else:
-    print ('Error: Please make sure \"' + icon + '\" is a file!')
+    print('Error: "%s" does not exist.')
     sys.exit(6)
 
 
index 450da42..7106fa2 100755 (executable)
@@ -430,7 +430,8 @@ def Execution(options, name):
       if os.path.isfile(x86_native_lib_path):
         native_lib_path += os.path.join('native_libs', 'x86', 'libs')
       else:
-        print('Missing x86 native library for Crosswalk embedded APK. Abort!')
+        print('No x86 native library has been found for creating a Crosswalk '
+              'embedded APK.')
         sys.exit(10)
     elif options.arch == 'arm':
       arm_native_lib_path = os.path.join('native_libs', 'armeabi-v7a', 'libs',
@@ -438,7 +439,8 @@ def Execution(options, name):
       if os.path.isfile(arm_native_lib_path):
         native_lib_path += os.path.join('native_libs', 'armeabi-v7a', 'libs')
       else:
-        print('Missing ARM native library for Crosswalk embedded APK. Abort!')
+        print('No ARM native library has been found for creating a Crosswalk '
+              'embedded APK.')
         sys.exit(10)
   # A space is needed for Windows.
   native_lib_path += ' '
@@ -702,7 +704,8 @@ def main(argv):
       print(GetVersion('VERSION'))
       return 0
     else:
-      parser.error('Can\'t get version due to the VERSION file missing!')
+      parser.error('VERSION was not found, so Crosswalk\'s version could not '
+                   'be determined.')
 
   xpk_temp_dir = ''
   if options.xpk:
@@ -721,14 +724,14 @@ def main(argv):
     if options.package:
       VerifyAppName(options.package, 'packagename')
     else:
-      parser.error('The package name is required! '
-                   'Please use "--package" option.')
+      parser.error('A package name is required. Please use the "--package" '
+                   'option.')
     if options.name:
       VerifyAppName(options.name)
       app_info.original_name = options.name
       options.name = ReplaceSpaceWithUnderscore(options.name)
     else:
-      parser.error('The APK name is required! Please use "--name" option.')
+      parser.error('An APK name is required. Please use the "--name" option.')
 
     # The checks here are really convoluted, but at the moment make_apk
     # misbehaves any of the following conditions is true.
index d01ba4f..6a93bfb 100755 (executable)
@@ -205,13 +205,13 @@ class TestMakeApk(unittest.TestCase):
            '--package=org.xwalk.example', self._mode]
     out = RunCommand(cmd)
     Clean('Example', '1.0.0')
-    self.assertTrue(out.find('The APK name is required!') != -1)
+    self.assertIn('An APK name is required', out)
 
     cmd = ['python', 'make_apk.py', '--name=Test_Example',
            '--app-version=1.0.0', '--app-url=http://www.intel.com',
            '--package=org.xwalk.example', self._mode]
     out = RunCommand(cmd)
-    self.assertTrue(out.find('The APK name is required!') == -1)
+    self.assertNotIn('An APK name is required', out)
     Clean('Test_Example', '1.0.0')
 
     invalid_chars = '\/:.*?"<>|-'
@@ -335,12 +335,12 @@ class TestMakeApk(unittest.TestCase):
            self._mode]
     out = RunCommand(cmd)
     self.addCleanup(Clean, 'Example', '1.0.0')
-    self.assertTrue(out.find('The package name is required!') != -1)
+    self.assertIn('A package name is required', out)
     Clean('Example', '1.0.0')
     cmd = ['python', 'make_apk.py', '--name=Example', '--app-version=1.0.0',
            '--package=org.xwalk.example', self._mode]
     out = RunCommand(cmd)
-    self.assertTrue(out.find('The package name is required!') == -1)
+    self.assertNotIn('A package name is required', out)
 
   def testEntry(self):
     cmd = ['python', 'make_apk.py', '--name=Example', '--app-version=1.0.0',
index b0e9708..d1b8be8 100644 (file)
@@ -196,7 +196,7 @@ GURL Application::GetURLFromRelativePathKey(const std::string& key) {
     int priority = arraysize(kDefaultWidgetEntryPage);
 
     for (base::FilePath file = iter.Next(); !file.empty(); file = iter.Next()) {
-      for (int i = 0; i < arraysize(kDefaultWidgetEntryPage); ++i) {
+      for (size_t i = 0; i < arraysize(kDefaultWidgetEntryPage); ++i) {
         if (file.BaseName().MaybeAsASCII() == kDefaultWidgetEntryPage[i] &&
             i < priority) {
           entry_page = kDefaultWidgetEntryPage[i];
index 87e1311..e5276b3 100644 (file)
@@ -134,7 +134,6 @@ Application* ApplicationService::Launch(
 
 Application* ApplicationService::Launch(
     const std::string& id, const Application::LaunchParams& params) {
-  Application* application = NULL;
   scoped_refptr<ApplicationData> application_data =
     application_storage_->GetApplicationData(id);
   if (!application_data) {
@@ -147,7 +146,6 @@ Application* ApplicationService::Launch(
 
 Application* ApplicationService::Launch(
     const base::FilePath& path, const Application::LaunchParams& params) {
-  Application* application = NULL;
   if (!base::DirectoryExists(path))
     return NULL;
 
index 1c44382..9c7d449 100644 (file)
@@ -16,7 +16,7 @@
 %endif
 
 Name:           crosswalk
-Version:        8.36.169.0
+Version:        8.36.171.0
 Release:        0
 Summary:        Crosswalk is an app runtime based on Chromium
 License:        (BSD-3-Clause and LGPL-2.1+)
index d7c067c..74d1fc8 100644 (file)
@@ -41,13 +41,15 @@ import org.xwalk.core.internal.XWalkViewInternal;
  * {@link XWalkUIClient} for listening to the events related to resource loading and UI.
  * By default, Crosswalk has a default implementation. Callers can override them if needed.</p>
  *
- * <p>Unlike other Android views, this class has to listen to system events like application life
- * cycle, intents, and activity result. The web engine inside this view need to get and handle
- * them. And the onDestroy() method of XWalkView MUST be called explicitly when an XWalkView
- * won't be used anymore, otherwise it will cause the memory leak from the native side of the web
- * engine. It's similar to the 
- * <a href="http://developer.android.com/reference/android/webkit/WebView.html#destroy()">
- * destroy()</a> method of Android WebView. For example:</p>
+ * <p>Unlike other Android views, this class has to listen to system events like intents and activity result.
+ * The web engine inside this view need to get and handle them.
+ * With contianer activity's lifecycle change, XWalkView will pause all timers and other
+ * components like videos when activity paused, resume back them when activity resumed.
+ * When activity is about to destroy, XWalkView will destroy itself as well.
+ * Embedders can also call onHide() and pauseTimers() to explicitly pause XWalkView.
+ * Similarily with onShow(), resumeTimers() and onDestroy().
+ *
+ * For example:</p>
  *
  * <pre>
  *   import android.app.Activity;
@@ -317,9 +319,8 @@ public class XWalkView extends XWalkViewInternal {
 
     /**
      * Pause all layout, parsing and JavaScript timers for all XWalkView instances.
-     * Typically it should be called when the activity for this view is paused,
-     * and accordingly {@link #resumeTimers} should be called when the activity
-     * is resumed again.
+     * It will be called when the container Activity get paused. It can also be explicitly
+     * called to pause timers.
      *
      * Note that it will globally impact all XWalkView instances, not limited to
      * just this XWalkView.
@@ -332,7 +333,8 @@ public class XWalkView extends XWalkViewInternal {
 
     /**
      * Resume all layout, parsing and JavaScript timers for all XWalkView instances.
-     * Typically it should be called when the activity for this view is resumed.
+     * It will be called when the container Activity get resumed. It can also be explicitly
+     * called to resume timers.
      *
      * Note that it will globally impact all XWalkView instances, not limited to
      * just this XWalkView.
@@ -347,7 +349,8 @@ public class XWalkView extends XWalkViewInternal {
      * Pause many other things except JavaScript timers inside rendering engine,
      * like video player, modal dialogs, etc. See {@link #pauseTimers} about pausing
      * JavaScript timers.
-     * Typically it should be called when the activity for this view is paused.
+     * It will be called when the container Activity get paused. It can also be explicitly
+     * called to pause above things.
      * @since 1.0
      */
     public void onHide() {
@@ -357,7 +360,8 @@ public class XWalkView extends XWalkViewInternal {
     /**
      * Resume video player, modal dialogs. Embedders are in charge of calling
      * this during resuming this activity if they call onHide.
-     * Typically it should be called when the activity for this view is resumed.
+     * It will be called when the container Activity get resumed. It can also be explicitly
+     * called to resume above things.
      * @since 1.0
      */
     public void onShow() {
@@ -366,6 +370,8 @@ public class XWalkView extends XWalkViewInternal {
 
     /**
      * Release internal resources occupied by this XWalkView.
+     * It will be called when the container Activity get destroyed. It can also be explicitly
+     * called to release resources.
      * @since 1.0
      */
     public void onDestroy() {
index 878f897..d91a26e 100644 (file)
@@ -27,6 +27,7 @@ import java.io.StringWriter;
 
 import org.chromium.base.ActivityState;
 import org.chromium.base.ApplicationStatus;
+import org.chromium.base.ApplicationStatus.ActivityStateListener;
 
 import org.xwalk.core.internal.extension.XWalkExtensionManager;
 import org.xwalk.core.internal.extension.XWalkPathHelper;
@@ -55,13 +56,15 @@ import org.xwalk.core.internal.extension.XWalkPathHelper;
  * {@link XWalkUIClientInternal} for listening to the events related to resource loading and UI.
  * By default, Crosswalk has a default implementation. Callers can override them if needed.</p>
  *
- * <p>Unlike other Android views, this class has to listen to system events like application life
- * cycle, intents, and activity result. The web engine inside this view need to get and handle
- * them. And the onDestroy() method of XWalkViewInternal MUST be called explicitly when an XWalkViewInternal
- * won't be used anymore, otherwise it will cause the memory leak from the native side of the web
- * engine. It's similar to the 
- * <a href="http://developer.android.com/reference/android/webkit/WebView.html#destroy()">
- * destroy()</a> method of Android WebView. For example:</p>
+ * <p>Unlike other Android views, this class has to listen to system events like intents and activity result.
+ * The web engine inside this view need to get and handle them.
+ * With contianer activity's lifecycle change, XWalkViewInternal will pause all timers and other
+ * components like videos when activity paused, resume back them when activity resumed.
+ * When activity is about to destroy, XWalkViewInternal will destroy itself as well.
+ * Embedders can also call onHide() and pauseTimers() to explicitly pause XWalkViewInternal.
+ * Similarily with onShow(), resumeTimers() and onDestroy().
+ *
+ * For example:</p>
  *
  * <pre>
  *   import android.app.Activity;
@@ -108,32 +111,6 @@ import org.xwalk.core.internal.extension.XWalkPathHelper;
  *       }
  *
  *       &#64;Override
- *       protected void onPause() {
- *           super.onPause();
- *           if (mXwalkView != null) {
- *               mXwalkView.pauseTimers();
- *               mXwalkView.onHide();
- *           }
- *       }
- *
- *       &#64;Override
- *       protected void onResume() {
- *           super.onResume();
- *           if (mXwalkView != null) {
- *               mXwalkView.resumeTimers();
- *               mXwalkView.onShow();
- *           }
- *       }
- *
- *       &#64;Override
- *       protected void onDestroy() {
- *           super.onDestroy();
- *           if (mXwalkView != null) {
- *               mXwalkView.onDestroy();
- *           }
- *       }
- *
- *       &#64;Override
  *       protected void onActivityResult(int requestCode, int resultCode, Intent data) {
  *           if (mXwalkView != null) {
  *               mXwalkView.onActivityResult(requestCode, resultCode, data);
@@ -149,7 +126,8 @@ import org.xwalk.core.internal.extension.XWalkPathHelper;
  *   }
  * </pre>
  */
-public class XWalkViewInternal extends android.widget.FrameLayout {
+public class XWalkViewInternal extends android.widget.FrameLayout
+        implements ActivityStateListener {
 
     static final String PLAYSTORE_DETAIL_URI = "market://details?id=";
 
@@ -235,6 +213,7 @@ public class XWalkViewInternal extends android.widget.FrameLayout {
         // Intialize library, paks and others.
         try {
             XWalkViewDelegate.init(this);
+            ApplicationStatus.registerStateListenerForActivity(this, getActivity());
         } catch (Throwable e) {
             // Try to find if there is UnsatisfiedLinkError in the cause chain of the met Throwable.
             Throwable linkError = e;
@@ -521,9 +500,8 @@ public class XWalkViewInternal extends android.widget.FrameLayout {
 
     /**
      * Pause all layout, parsing and JavaScript timers for all XWalkViewInternal instances.
-     * Typically it should be called when the activity for this view is paused,
-     * and accordingly {@link #resumeTimers} should be called when the activity
-     * is resumed again.
+     * It will be called when the container Activity get paused. It can also be explicitly
+     * called to pause timers.
      *
      * Note that it will globally impact all XWalkViewInternal instances, not limited to
      * just this XWalkViewInternal.
@@ -538,7 +516,8 @@ public class XWalkViewInternal extends android.widget.FrameLayout {
 
     /**
      * Resume all layout, parsing and JavaScript timers for all XWalkViewInternal instances.
-     * Typically it should be called when the activity for this view is resumed.
+     * It will be called when the container Activity get resumed. It can also be explicitly
+     * called to resume timers.
      *
      * Note that it will globally impact all XWalkViewInternal instances, not limited to
      * just this XWalkViewInternal.
@@ -555,7 +534,8 @@ public class XWalkViewInternal extends android.widget.FrameLayout {
      * Pause many other things except JavaScript timers inside rendering engine,
      * like video player, modal dialogs, etc. See {@link #pauseTimers} about pausing
      * JavaScript timers.
-     * Typically it should be called when the activity for this view is paused.
+     * It will be called when the container Activity get paused. It can also be explicitly
+     * called to pause above things.
      * @since 1.0
      */
     public void onHide() {
@@ -569,6 +549,8 @@ public class XWalkViewInternal extends android.widget.FrameLayout {
      * Resume video player, modal dialogs. Embedders are in charge of calling
      * this during resuming this activity if they call onHide.
      * Typically it should be called when the activity for this view is resumed.
+     * It will be called when the container Activity get resumed. It can also be explicitly
+     * called to resume above things.
      * @since 1.0
      */
     public void onShow() {
@@ -580,6 +562,8 @@ public class XWalkViewInternal extends android.widget.FrameLayout {
 
     /**
      * Release internal resources occupied by this XWalkViewInternal.
+     * It will be called when the container Activity get destroyed. It can also be explicitly
+     * called to release resources.
      * @since 1.0
      */
     public void onDestroy() {
@@ -869,4 +853,27 @@ public class XWalkViewInternal extends android.widget.FrameLayout {
         }
         return super.dispatchKeyEvent(event);
     }
+
+    /**
+     * @hide
+     */
+    @Override
+    public void onActivityStateChange(Activity activity, int newState) {
+        assert(getActivity() == activity);
+        switch (newState) {
+            case ActivityState.PAUSED:
+                pauseTimers();
+                onHide();
+                break;
+            case ActivityState.RESUMED:
+                onShow();
+                resumeTimers();
+                break;
+            case ActivityState.DESTROYED:
+                onDestroy();
+                break;
+            default:
+                break;
+        }
+    }
 }
index 3224a03..3bcbd11 100644 (file)
@@ -170,23 +170,10 @@ public class XWalkViewShellActivity extends FragmentActivity
     }
 
     @Override
-    public void onPause() {
-        super.onPause();
-        mSectionsPagerAdapter.onPause();
-    }
-
-    @Override
-    public void onResume() {
-        super.onResume();
-        mSectionsPagerAdapter.onResume();
-    }
-
-    @Override
     public void onDestroy() {
         super.onDestroy();
         unregisterReceiver(mReceiver);
         unregisterTracingReceiver();
-        mSectionsPagerAdapter.onDestroy();
     }
 
     @Override
index 7661772..95f1315 100644 (file)
@@ -51,19 +51,14 @@ class XWalkCoreProviderImpl implements XWalkRuntimeViewProvider {
 
     @Override
     public void onResume() {
-        mXWalkView.resumeTimers();
-        mXWalkView.onShow();
     }
 
     @Override
     public void onPause() {
-        mXWalkView.pauseTimers();
-        mXWalkView.onHide();
     }
 
     @Override
     public void onDestroy() {
-        mXWalkView.onDestroy();
     }
 
     @Override
index 3b0e12e..0d1691a 100644 (file)
@@ -34,30 +34,4 @@ public class MultiXWalkViewActivity extends XWalkBaseActivity {
         mXWalkView.load("http://www.intel.com", null);
         mXWalkView2.load("http://www.baidu.com", null);
     }
-
-    @Override
-    public void onPause() {
-        super.onPause();
-        if (mXWalkView2 != null) {
-            mXWalkView2.onHide();
-            mXWalkView2.pauseTimers();
-        }
-    }
-
-    @Override
-    public void onResume() {
-        super.onResume();
-        if (mXWalkView2 != null) {
-            mXWalkView2.onShow();
-            mXWalkView2.resumeTimers();
-        }
-    }
-
-    @Override
-    public void onDestroy() {
-        super.onDestroy();
-        if (mXWalkView2 != null) {
-            mXWalkView2.onDestroy();
-        }
-    }
 }
index 6803f6b..b50e103 100644 (file)
@@ -10,39 +10,4 @@ import android.app.Activity;
 
 public class XWalkBaseActivity extends Activity {
     protected XWalkView mXWalkView;
-
-    /*
-     * When the activity is paused, XWalkView.onHide() and XWalkView.pauseTimers() need to be called.
-     */
-    @Override
-    public void onPause() {
-        super.onPause();
-        if (mXWalkView != null) {
-            mXWalkView.onHide();
-            mXWalkView.pauseTimers();
-        }
-    }
-
-    /*
-     * When the activity is resumed, XWalkView.onShow() and XWalkView.resumeTimers() need to be called.
-     */
-    @Override
-    public void onResume() {
-        super.onResume();
-        if (mXWalkView != null) {
-            mXWalkView.onShow();
-            mXWalkView.resumeTimers();
-        }
-    }
-
-    /*
-     * Call onDestroy on XWalkView to release native resources when the activity is destroyed.
-     */
-    @Override
-    public void onDestroy() {
-        super.onDestroy();
-        if (mXWalkView != null) {
-            mXWalkView.onDestroy();
-        }
-    }
 }
index 5ced019..40beb31 100644 (file)
@@ -12,7 +12,7 @@
 #include "ui/gfx/screen.h"
 #include "ui/views/view.h"
 #include "ui/views/widget/widget.h"
-#include "xwalk/runtime/browser/ui/splash_screen.h"
+#include "xwalk/runtime/browser/ui/splash_screen_tizen.h"
 #include "xwalk/runtime/browser/ui/top_view_layout_views.h"
 #include "xwalk/runtime/browser/xwalk_browser_main_parts_tizen.h"
 
@@ -101,7 +101,7 @@ void NativeAppWindowTizen::Initialize() {
 
   const base::FilePath& splash_screen_path = create_params().splash_screen_path;
   if (!splash_screen_path.empty()) {
-    splash_screen_.reset(new SplashScreen(
+    splash_screen_.reset(new SplashScreenTizen(
         GetWidget(), splash_screen_path, create_params().web_contents));
     splash_screen_->Start();
   }
index d6bbf9b..8f2ed01 100644 (file)
@@ -16,7 +16,7 @@
 
 namespace xwalk {
 
-class SplashScreen;
+class SplashScreenTizen;
 
 // Tizen uses the Views native window but adds its own features like orientation
 // handling and integration with system indicator bar.
@@ -70,7 +70,7 @@ class NativeAppWindowTizen
 
   gfx::Display display_;
   blink::WebScreenOrientationLockType orientation_lock_;
-  scoped_ptr<SplashScreen> splash_screen_;
+  scoped_ptr<SplashScreenTizen> splash_screen_;
 
   DISALLOW_COPY_AND_ASSIGN(NativeAppWindowTizen);
 };
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-#include "xwalk/runtime/browser/ui/splash_screen.h"
+#include "xwalk/runtime/browser/ui/splash_screen_tizen.h"
 
 #include "base/location.h"
 #include "ui/compositor/layer.h"
@@ -18,7 +18,7 @@ namespace {
 const int kHideAnimationDuration = 1;  // second
 }  // namespace
 
-class SplashScreen::SplashScreenLayerDelegate : public ui::LayerDelegate {
+class SplashScreenTizen::SplashScreenLayerDelegate : public ui::LayerDelegate {
  public:
   SplashScreenLayerDelegate() {}
 
@@ -48,9 +48,9 @@ class SplashScreen::SplashScreenLayerDelegate : public ui::LayerDelegate {
   DISALLOW_COPY_AND_ASSIGN(SplashScreenLayerDelegate);
 };
 
-SplashScreen::SplashScreen(views::Widget* host,
-                           const base::FilePath& file,
-                           content::WebContents* web_contents)
+SplashScreenTizen::SplashScreenTizen(views::Widget* host,
+                                     const base::FilePath& file,
+                                     content::WebContents* web_contents)
     : content::WebContentsObserver(web_contents),
       widget_host_(host),
       splash_screen_image_(file),
@@ -61,9 +61,9 @@ SplashScreen::SplashScreen(views::Widget* host,
   layer_->set_delegate(layer_delegate_.get());
 }
 
-SplashScreen::~SplashScreen() {}
+SplashScreenTizen::~SplashScreenTizen() {}
 
-void SplashScreen::Start() {
+void SplashScreenTizen::Start() {
   DCHECK(widget_host_);
   if (is_started)
     return;
@@ -83,7 +83,7 @@ void SplashScreen::Start() {
   }
 }
 
-void SplashScreen::Stop() {
+void SplashScreenTizen::Stop() {
   DCHECK(widget_host_);
   if (!is_started)
     return;
@@ -97,23 +97,25 @@ void SplashScreen::Stop() {
   layer_->SetOpacity(0.0f);
 }
 
-void SplashScreen::DidFinishLoad(int64 frame_id,
-                                 const GURL& validated_url,
-                                 bool is_main_frame,
-                                 content::RenderViewHost* render_view_host) {
+void SplashScreenTizen::DidFinishLoad(
+    int64 frame_id,
+    const GURL& validated_url,
+    bool is_main_frame,
+    content::RenderViewHost* render_view_host) {
   Stop();
 }
 
-void SplashScreen::DidFailLoad(int64 frame_id,
-                               const GURL& validated_url,
-                               bool is_main_frame,
-                               int error_code,
-                               const base::string16& error_description,
-                               content::RenderViewHost* render_view_host) {
+void SplashScreenTizen::DidFailLoad(
+    int64 frame_id,
+    const GURL& validated_url,
+    bool is_main_frame,
+    int error_code,
+    const base::string16& error_description,
+    content::RenderViewHost* render_view_host) {
   Stop();
 }
 
-void SplashScreen::OnImplicitAnimationsCompleted() {
+void SplashScreenTizen::OnImplicitAnimationsCompleted() {
   DCHECK(widget_host_);
   widget_host_->GetLayer()->Remove(layer_.get());
 }
@@ -2,8 +2,8 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-#ifndef XWALK_RUNTIME_BROWSER_UI_SPLASH_SCREEN_H_
-#define XWALK_RUNTIME_BROWSER_UI_SPLASH_SCREEN_H_
+#ifndef XWALK_RUNTIME_BROWSER_UI_SPLASH_SCREEN_TIZEN_H_
+#define XWALK_RUNTIME_BROWSER_UI_SPLASH_SCREEN_TIZEN_H_
 
 #include "base/files/file_path.h"
 #include "content/public/browser/web_contents_observer.h"
@@ -24,13 +24,13 @@ class Widget;
 
 namespace xwalk {
 
-class SplashScreen : public content::WebContentsObserver,
-                     public ui::ImplicitAnimationObserver {
+class SplashScreenTizen : public content::WebContentsObserver,
+                          public ui::ImplicitAnimationObserver {
  public:
-  SplashScreen(views::Widget* host,
-               const base::FilePath& file,
-               content::WebContents* web_contents);
-  ~SplashScreen();
+  SplashScreenTizen(views::Widget* host,
+                    const base::FilePath& file,
+                    content::WebContents* web_contents);
+  ~SplashScreenTizen();
 
   void Start();
   void Stop();
@@ -62,9 +62,9 @@ class SplashScreen : public content::WebContentsObserver,
 
   bool is_started;
 
-  DISALLOW_COPY_AND_ASSIGN(SplashScreen);
+  DISALLOW_COPY_AND_ASSIGN(SplashScreenTizen);
 };
 
 }  // namespace xwalk
 
-#endif  // XWALK_RUNTIME_BROWSER_UI_SPLASH_SCREEN_H_
+#endif  // XWALK_RUNTIME_BROWSER_UI_SPLASH_SCREEN_TIZEN_H_
index f5e97e1..f678b72 100644 (file)
@@ -6,6 +6,7 @@
 package org.xwalk.runtime.client.test;
 
 import android.test.suitebuilder.annotation.SmallTest;
+import org.chromium.base.test.util.DisabledTest;
 import org.chromium.base.test.util.Feature;
 import org.xwalk.runtime.client.shell.XWalkRuntimeClientShellActivity;
 import org.xwalk.test.util.RuntimeClientApiTestBase;
@@ -15,8 +16,9 @@ import org.xwalk.test.util.RuntimeClientApiTestBase;
  */
 public class PauseResumeTest extends XWalkRuntimeClientTestBase {
 
-    @SmallTest
-    @Feature({"PauseResume"})
+    // @SmallTest
+    // @Feature({"PauseResume"})
+    @DisabledTest
     public void testPauseAndResume() throws Throwable {
         RuntimeClientApiTestBase<XWalkRuntimeClientShellActivity> helper =
                 new RuntimeClientApiTestBase<XWalkRuntimeClientShellActivity>(
index 94b40ae..881bdbe 100644 (file)
@@ -6,6 +6,7 @@
 package org.xwalk.runtime.client.embedded.test;
 
 import android.test.suitebuilder.annotation.SmallTest;
+import org.chromium.base.test.util.DisabledTest;
 import org.chromium.base.test.util.Feature;
 import org.xwalk.runtime.client.embedded.shell.XWalkRuntimeClientEmbeddedShellActivity;
 import org.xwalk.test.util.RuntimeClientApiTestBase;
@@ -15,8 +16,9 @@ import org.xwalk.test.util.RuntimeClientApiTestBase;
  */
 public class PauseResumeTest extends XWalkRuntimeClientTestBase {
 
-    @SmallTest
-    @Feature({"PauseResume"})
+    // @SmallTest
+    // @Feature({"PauseResume"})
+    @DisabledTest
     public void testPauseAndResume() throws Throwable {
         RuntimeClientApiTestBase<XWalkRuntimeClientEmbeddedShellActivity> helper =
                 new RuntimeClientApiTestBase<XWalkRuntimeClientEmbeddedShellActivity>(
index aadd4f4..7b691ae 100644 (file)
         'runtime/browser/ui/native_app_window_tizen.h',
         'runtime/browser/ui/native_app_window_views.cc',
         'runtime/browser/ui/native_app_window_views.h',
-        'runtime/browser/ui/splash_screen.cc',
-        'runtime/browser/ui/splash_screen.h',
+        'runtime/browser/ui/splash_screen_tizen.cc',
+        'runtime/browser/ui/splash_screen_tizen.h',
         'runtime/browser/ui/taskbar_util.h',
         'runtime/browser/ui/taskbar_util_win.cc',
         'runtime/browser/ui/top_view_layout_views.cc',
       'conditions': [
         ['tizen==1', {
           'dependencies': [
+            '../content/content_resources.gyp:content_resources',
             'build/system.gyp:tizen_geolocation',
             'sysapps/sysapps_resources.gyp:xwalk_sysapps_resources',
             'tizen/xwalk_tizen.gypi:xwalk_tizen_lib',
                 ],
               },
             }],
+            [ 'tizen==1', {
+              'variables': {
+                'pak_inputs+': [
+                  # Add WebUI resources for Tizen.
+                  '<(SHARED_INTERMEDIATE_DIR)/content/content_resources.pak',
+                  '<(SHARED_INTERMEDIATE_DIR)/ui/ui_resources/webui_resources.pak',
+                ],
+              },
+            }],
           ],
           'inputs': [
             '<(repack_path)',