diff options
author | boliu@chromium.org <boliu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-11-21 12:34:09 +0000 |
---|---|---|
committer | boliu@chromium.org <boliu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-11-21 12:34:09 +0000 |
commit | 1f0d041d875f287e1da906c39db249f713433ef2 (patch) | |
tree | 3c193ea4634a524e511967722d9f582571451d3a /android_webview/native/webview_native.gyp | |
parent | f45a5f17a7cd4b7819f59fd0048cf6f6f37113b0 (diff) | |
download | chromium_src-1f0d041d875f287e1da906c39db249f713433ef2.zip chromium_src-1f0d041d875f287e1da906c39db249f713433ef2.tar.gz chromium_src-1f0d041d875f287e1da906c39db249f713433ef2.tar.bz2 |
Android WebView save/restoreState and backForardList Part 1
Design for save/restoreState is do all serialization in native and pass
an opaque byte array to java to put into the bundle.
This patch contains the native code to (de)serialize a WebContents with
some unit test coverage.
Reasons for not re-using TabNavigation under chrome/:
* Android WebView has different requirements for fields to store since
we are the only ones using values like base_url_for_data_url.
* TabNavigation does unnecessary copying of data, which in Android
WebView case, is undesired since save/restore is called in Android
very frequently.
* TabNavigation is tightly integrated with the rest of chrome session
restore and sync code, and has other purpose in addition to serializing
NavigationEntry.
Optimization-wise, there will be an unnecessary copy when converting
native to java byte array. Only way to avoid it is to know the
allocation size before pickling starts. Maybe consider pre-computing the
size (brittle), or use chrome's design of capping the size of the data
and throwing away old entries and "less important" information. Only
consider this if speed becomes a problem.
BUG=
Android WebView only change. Ran through trybots.
NOTRY=true
Review URL: https://chromiumcodereview.appspot.com/11420056
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@169024 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'android_webview/native/webview_native.gyp')
-rw-r--r-- | android_webview/native/webview_native.gyp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/android_webview/native/webview_native.gyp b/android_webview/native/webview_native.gyp index 3bdc34b..fb3b09a 100644 --- a/android_webview/native/webview_native.gyp +++ b/android_webview/native/webview_native.gyp @@ -36,8 +36,8 @@ 'aw_http_auth_handler.h', 'aw_javascript_dialog_creator.cc', 'aw_javascript_dialog_creator.h', - 'aw_resource.h', 'aw_resource.cc', + 'aw_resource.h', 'aw_web_contents_delegate.cc', 'aw_web_contents_delegate.h', 'cookie_manager.cc', @@ -47,6 +47,8 @@ 'js_result_handler.cc', 'js_result_handler.h', 'net_init_native_callback.cc', + 'state_serializer.cc', + 'state_serializer.h', ], }, { |