diff options
author | darin@chromium.org <darin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-06-25 19:36:17 +0000 |
---|---|---|
committer | darin@chromium.org <darin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-06-25 19:36:17 +0000 |
commit | ca948a21e18cdac84a933ce9ebd72be4152d8a32 (patch) | |
tree | 2c4fa33bc742c0a9a5e144128a8e277f16620409 /webkit/glue/glue_serialize.h | |
parent | f8646f7f53d9f48139b37588953170c3a882509f (diff) | |
download | chromium_src-ca948a21e18cdac84a933ce9ebd72be4152d8a32.zip chromium_src-ca948a21e18cdac84a933ce9ebd72be4152d8a32.tar.gz chromium_src-ca948a21e18cdac84a933ce9ebd72be4152d8a32.tar.bz2 |
Hook up WebHistoryItem and push HistoryItem serialization out of WebFrame.
WebHistoryItem is a copy-on-write wrapper for a WebCore::HistoryItem.
Pushing history item serialization out of WebFrame allows us to avoid a
dependency on base/pickle from WebFrame. This helps get us closer to
being able to move WebFrame into the WebKit API.
BUG=10043
TEST=none
R=dglazkov,sky
Review URL: http://codereview.chromium.org/146075
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@19275 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/glue/glue_serialize.h')
-rw-r--r-- | webkit/glue/glue_serialize.h | 31 |
1 files changed, 13 insertions, 18 deletions
diff --git a/webkit/glue/glue_serialize.h b/webkit/glue/glue_serialize.h index eaa3f6d..ea73032 100644 --- a/webkit/glue/glue_serialize.h +++ b/webkit/glue/glue_serialize.h @@ -7,30 +7,25 @@ // In serialization, we write an object's state to a string in some opaque // format. Deserialization reconstructs the object's state from such a string. -#ifndef WEBKIT_GLUE_GLUE_SERIALIZE_H__ -#define WEBKIT_GLUE_GLUE_SERIALIZE_H__ +#ifndef WEBKIT_GLUE_GLUE_SERIALIZE_H_ +#define WEBKIT_GLUE_GLUE_SERIALIZE_H_ -namespace WebCore { -class String; -class HistoryItem; -} -namespace WTF { -template<typename T> class PassRefPtr; -} +#include <string> +#include "webkit/api/public/WebHistoryItem.h" namespace webkit_glue { -// HistoryItem serialization. The returned HistoryItem will have a ref count -// of 0, so the first RefPtr it is assigned to will take ownership. The empty -// string corresponds with a NULL HistoryItem. -void HistoryItemToString( - WTF::PassRefPtr<WebCore::HistoryItem> item, std::string* serialized_item); -WTF::PassRefPtr<WebCore::HistoryItem> HistoryItemFromString( + +// HistoryItem serialization. +std::string HistoryItemToString( + const WebKit::WebHistoryItem& item); +WebKit::WebHistoryItem HistoryItemFromString( const std::string& serialized_item); // For testing purposes only. void HistoryItemToVersionedString( - WTF::PassRefPtr<WebCore::HistoryItem> item, int version, + const WebKit::WebHistoryItem& item, int version, std::string* serialized_item); -} -#endif // #ifndef WEBKIT_GLUE_GLUE_SERIALIZE_H__ +} // namespace webkit_glue + +#endif // #ifndef WEBKIT_GLUE_GLUE_SERIALIZE_H_ |