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

Side by Side Diff: android_webview/native/state_serializer.h

Issue 11420056: Android WebView save/restoreState and backForardList Part 1 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: namespace internal, add comments 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
« no previous file with comments | « android_webview/android_webview_tests.gypi ('k') | android_webview/native/state_serializer.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4 //
5 #ifndef ANDROID_WEBVIEW_NATIVE_STATE_SERIALIZER_H_
6 #define ANDROID_WEBVIEW_NATIVE_STATE_SERIALIZER_H_
7
8 #include "base/compiler_specific.h"
9
10 class Pickle;
11 class PickleIterator;
12
13 namespace content {
14
15 class NavigationEntry;
16 class WebContents;
17
18 } // namespace content
19
20 namespace android_webview {
21
22 // Write and restore a WebContents to and from a pickle. Return true on
23 // success. Note that no promise is made that the output variable is not
joth 2012/11/20 23:06:48 nit: Functions to write and restore... (i read th
boliu 2012/11/20 23:21:12 This is not true anymore since NavigationControlle
24 // changed if false is returned.
25
26 // Note that |pickle| may be changed even if function returns false.
27 bool WriteToPickle(const content::WebContents& web_contents,
28 Pickle* pickle) WARN_UNUSED_RESULT;
29
30 // |web_contents| will not be modified if function returns false.
31 bool RestoreFromPickle(PickleIterator* iterator,
32 content::WebContents* web_contents) WARN_UNUSED_RESULT;
33
34
35 namespace internal {
36 // Functions below are individual helper functiosn called by functions above.
37 // They are broken up for unit testing, and should not be called out side of
38 // tests.
39 bool WriteHeaderToPickle(Pickle* pickle) WARN_UNUSED_RESULT;
40 bool RestoreHeaderFromPickle(PickleIterator* iterator) WARN_UNUSED_RESULT;
41 bool WriteNavigationEntryToPickle(const content::NavigationEntry& entry,
42 Pickle* pickle) WARN_UNUSED_RESULT;
43 bool RestoreNavigationEntryFromPickle(
44 PickleIterator* iterator,
45 content::NavigationEntry* entry) WARN_UNUSED_RESULT;
46
47 } // namespace interanl
48
49 } // namespace android_webview
50
51 #endif // ANDROID_WEBVIEW_NATIVE_STATE_SERIALIZER_H_
OLDNEW
« no previous file with comments | « android_webview/android_webview_tests.gypi ('k') | android_webview/native/state_serializer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698