Chromium Code Reviews
DescriptionAndroid 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
Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=169024
Patch Set 1 #Patch Set 2 : Use ScopedVector #
Total comments: 14
Patch Set 3 : namespace internal, add comments #
Total comments: 2
Patch Set 4 : Remove outdated comment #
Messages
Total messages: 12 (0 generated)
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||