1 // Copyright 2014 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.
5 #ifndef COMPONENTS_SESSIONS_IOS_IOS_SERIALIZED_NAVIGATION_BUILDER_H_
6 #define COMPONENTS_SESSIONS_IOS_IOS_SERIALIZED_NAVIGATION_BUILDER_H_
10 #include "base/memory/scoped_ptr.h"
17 class SerializedNavigationEntry
;
19 // Provides methods to convert between SerializedNavigationEntry and //ios/web
21 class IOSSerializedNavigationBuilder
{
23 // Construct a SerializedNavigationEntry for a particular index from the given
25 static SerializedNavigationEntry
FromNavigationItem(
26 int index
, const web::NavigationItem
& item
);
28 // Convert the given SerializedNavigationEntry into a NavigationItem with the
29 // given page ID. The NavigationItem will have a transition type of
30 // PAGE_TRANSITION_RELOAD and a new unique ID.
31 static scoped_ptr
<web::NavigationItem
> ToNavigationItem(
32 const SerializedNavigationEntry
* navigation
, int page_id
);
35 } // namespace sessions
37 #endif // COMPONENTS_SESSIONS_IOS_IOS_SERIALIZED_NAVIGATION_BUILDER_H_