Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(139)

Side by Side Diff: android_webview/java/src/org/chromium/android_webview/AwContents.java

Issue 11348113: Android WebView save/restoreState and copyBackForwardList (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 package org.chromium.android_webview; 5 package org.chromium.android_webview;
6 6
7 import android.content.res.Configuration; 7 import android.content.res.Configuration;
8 import android.graphics.Bitmap; 8 import android.graphics.Bitmap;
9 import android.graphics.Canvas; 9 import android.graphics.Canvas;
10 import android.graphics.Rect; 10 import android.graphics.Rect;
(...skipping 17 matching lines...) Expand all
28 import org.chromium.content.browser.LoadUrlParams; 28 import org.chromium.content.browser.LoadUrlParams;
29 import org.chromium.content.browser.NavigationHistory; 29 import org.chromium.content.browser.NavigationHistory;
30 import org.chromium.content.common.CleanupReference; 30 import org.chromium.content.common.CleanupReference;
31 import org.chromium.content.components.navigation_interception.InterceptNavigati onDelegate; 31 import org.chromium.content.components.navigation_interception.InterceptNavigati onDelegate;
32 import org.chromium.net.X509Util; 32 import org.chromium.net.X509Util;
33 import org.chromium.ui.gfx.NativeWindow; 33 import org.chromium.ui.gfx.NativeWindow;
34 34
35 import java.io.File; 35 import java.io.File;
36 import java.net.MalformedURLException; 36 import java.net.MalformedURLException;
37 import java.net.URL; 37 import java.net.URL;
38 import java.security.cert.CertificateException;
39 import java.security.cert.X509Certificate;
38 import java.security.KeyStoreException; 40 import java.security.KeyStoreException;
39 import java.security.NoSuchAlgorithmException; 41 import java.security.NoSuchAlgorithmException;
40 import java.security.cert.CertificateException; 42 import java.util.ArrayList;
41 import java.security.cert.X509Certificate; 43 import java.util.List;
42 44
43 /** 45 /**
44 * Exposes the native AwContents class, and together these classes wrap the Cont entViewCore 46 * Exposes the native AwContents class, and together these classes wrap the Cont entViewCore
45 * and Browser components that are required to implement Android WebView API. Th is is the 47 * and Browser components that are required to implement Android WebView API. Th is is the
46 * primary entry point for the WebViewProvider implementation; it holds a 1:1 ob ject 48 * primary entry point for the WebViewProvider implementation; it holds a 1:1 ob ject
47 * relationship with application WebView instances. 49 * relationship with application WebView instances.
48 * (We define this class independent of the hidden WebViewProvider interfaces, t o allow 50 * (We define this class independent of the hidden WebViewProvider interfaces, t o allow
49 * continuous build & test in the open source SDK-based tree). 51 * continuous build & test in the open source SDK-based tree).
50 */ 52 */
51 @JNINamespace("android_webview") 53 @JNINamespace("android_webview")
(...skipping 560 matching lines...) Expand 10 before | Expand all | Expand 10 after
612 updateVisiblityState(); 614 updateVisiblityState();
613 } 615 }
614 616
615 private void updateVisiblityState() { 617 private void updateVisiblityState() {
616 if (mNativeAwContents == 0 || mIsPaused) return; 618 if (mNativeAwContents == 0 || mIsPaused) return;
617 nativeSetWindowViewVisibility(mNativeAwContents, 619 nativeSetWindowViewVisibility(mNativeAwContents,
618 mContainerView.getWindowVisibility() == View.VISIBLE, 620 mContainerView.getWindowVisibility() == View.VISIBLE,
619 mContainerView.getVisibility() == View.VISIBLE); 621 mContainerView.getVisibility() == View.VISIBLE);
620 } 622 }
621 623
624 public static class HistoryItem {
625 public Bitmap favicon;
626 public String originalUrl;
627 public String title;
628 public String url;
629 }
630
631 public static class HistoryItemList {
632 public int currentIndex;
633 public List<HistoryItem> historyItemList;
634 }
635
636 public HistoryItemList getHistoryItemList() {
637 return null;
638 }
639
640 public void saveState(Bundle outState) {
641 }
642
643 public void restoreState(Bundle inState) {
644 }
622 645
623 //-------------------------------------------------------------------------- ------------------ 646 //-------------------------------------------------------------------------- ------------------
624 // Methods called from native via JNI 647 // Methods called from native via JNI
625 //-------------------------------------------------------------------------- ------------------ 648 //-------------------------------------------------------------------------- ------------------
626 649
627 @CalledByNative 650 @CalledByNative
628 private static void onDocumentHasImagesResponse(boolean result, Message mess age) { 651 private static void onDocumentHasImagesResponse(boolean result, Message mess age) {
629 message.arg1 = result ? 1 : 0; 652 message.arg1 = result ? 1 : 0;
630 message.sendToTarget(); 653 message.sendToTarget();
631 } 654 }
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
757 private native void nativeFindNext(int nativeAwContents, boolean forward); 780 private native void nativeFindNext(int nativeAwContents, boolean forward);
758 private native void nativeClearMatches(int nativeAwContents); 781 private native void nativeClearMatches(int nativeAwContents);
759 private native void nativeClearCache(int nativeAwContents, boolean includeDi skFiles); 782 private native void nativeClearCache(int nativeAwContents, boolean includeDi skFiles);
760 private native byte[] nativeGetCertificate(int nativeAwContents); 783 private native byte[] nativeGetCertificate(int nativeAwContents);
761 private native void nativeRequestNewHitTestDataAt(int nativeAwContents, int x, int y); 784 private native void nativeRequestNewHitTestDataAt(int nativeAwContents, int x, int y);
762 private native void nativeUpdateLastHitTestData(int nativeAwContents); 785 private native void nativeUpdateLastHitTestData(int nativeAwContents);
763 private native void nativeOnSizeChanged(int nativeAwContents, int w, int h, int ow, int oh); 786 private native void nativeOnSizeChanged(int nativeAwContents, int w, int h, int ow, int oh);
764 private native void nativeSetWindowViewVisibility(int nativeAwContents, bool ean windowVisible, 787 private native void nativeSetWindowViewVisibility(int nativeAwContents, bool ean windowVisible,
765 boolean viewVisible); 788 boolean viewVisible);
766 } 789 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698