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

Unified Diff: android_webview/native/state_serializer.h

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 side-by-side diff with in-line comments
Download patch
Index: android_webview/native/state_serializer.h
diff --git a/android_webview/native/state_serializer.h b/android_webview/native/state_serializer.h
new file mode 100644
index 0000000000000000000000000000000000000000..e3f7bc20f3ef26c235bf19ea7a000a078c4f1ade
--- /dev/null
+++ b/android_webview/native/state_serializer.h
@@ -0,0 +1,41 @@
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+//
+#ifndef ANDROID_WEBVIEW_NATIVE_STATE_SERIALIZER_H_
+#define ANDROID_WEBVIEW_NATIVE_STATE_SERIALIZER_H_
+
+#include "base/compiler_specific.h"
+
+class Pickle;
+class PickleIterator;
+
+namespace content {
+
+class NavigationEntry;
+class WebContents;
+
+} // namespace content
+
+namespace android_webview {
+
+bool WriteToPickle(const content::WebContents& web_contents,
+ Pickle* pickle) WARN_UNUSED_RESULT;
+
+bool RestoreFromPickle(PickleIterator* iterator,
+ content::WebContents* web_contents) WARN_UNUSED_RESULT;
+
+
+// Functions below are individual helper functiosn called by functions above.
+// They are broken up for unit testing, and probalby should not be called out
+// side of tests.
+bool WriteHeaderToPickle(Pickle* pickle) WARN_UNUSED_RESULT;
+bool RestoreHeaderFromPickle(PickleIterator* iterator) WARN_UNUSED_RESULT;
+bool WriteNavigationEntryToPickle(const content::NavigationEntry& entry,
+ Pickle* pickle) WARN_UNUSED_RESULT;
+bool RestoreNavigationEntryFromPickle(
+ PickleIterator* iterator,
+ content::NavigationEntry* entry) WARN_UNUSED_RESULT;
+} // namespace android_webview
+
+#endif // ANDROID_WEBVIEW_NATIVE_STATE_SERIALIZER_H_

Powered by Google App Engine
This is Rietveld 408576698