Upstream version 8.36.171.0
[platform/framework/web/crosswalk.git] / src / xwalk / runtime / android / core_shell / src / org / xwalk / core / xwview / shell / XWalkViewShellActivity.java
index 06fa264..3bcbd11 100644 (file)
@@ -39,11 +39,11 @@ import org.chromium.content.browser.TracingControllerAndroid;
 import org.xwalk.core.XWalkNavigationHistory;
 import org.xwalk.core.XWalkPreferences;
 import org.xwalk.core.XWalkResourceClient;
+import org.xwalk.core.XWalkUIClient;
 import org.xwalk.core.XWalkView;
-import org.xwalk.core.XWalkWebChromeClient;
 
 public class XWalkViewShellActivity extends FragmentActivity
-        implements ActionBar.TabListener, XWalkViewSectionFragment.OnXWalkViewCreatedListener{
+        implements ActionBar.TabListener, XWalkViewSectionFragment.OnXWalkViewCreatedListener {
     public static final String COMMAND_LINE_FILE = "/data/local/tmp/xwview-shell-command-line";
     private static final String TAG = XWalkViewShellActivity.class.getName();
     public static final String COMMAND_LINE_ARGS_KEY = "commandLineArgs";
@@ -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
@@ -195,14 +182,6 @@ public class XWalkViewShellActivity extends FragmentActivity
     }
 
     @Override
-    public boolean onKeyUp(int keyCode, KeyEvent event) {
-        if (mActiveView != null) {
-            return mActiveView.onKeyUp(keyCode, event) || super.onKeyUp(keyCode, event);
-        }
-        return super.onKeyUp(keyCode, event);
-    }
-
-    @Override
     public void onNewIntent(Intent intent) {
         if (mActiveView != null) {
             if (!mActiveView.onNewIntent(intent)) super.onNewIntent(intent);
@@ -320,7 +299,7 @@ public class XWalkViewShellActivity extends FragmentActivity
             }
         });
 
-        xwalkView.setXWalkWebChromeClient(new XWalkWebChromeClient(xwalkView) {
+        xwalkView.setUIClient(new XWalkUIClient(xwalkView) {
             @Override
             public void onReceivedTitle(XWalkView view, String title) {
                 mSectionsPagerAdapter.setPageTitle(view, title);