blob: 109cd87a3fa6eda10049495739b228a581bf3e79 [file] [log] [blame]
// Copyright 2017 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.
#import <WebKit/WebKit.h>
#include <memory>
namespace web {
class NavigationItemImpl;
} // namespace web
// An NSObject wrapper for an std::unique_ptr<NavigationItemImpl>. This object
// is used to associate a NavigationItemImpl to a WKBackForwardListItem to store
// additional navigation states needed by the embedder.
@interface CRWNavigationItemHolder : NSObject
// Returns the CRWNavigationItemHolder object associated with |item|. Creates an
// empty holder if none currently exists for |item|.
+ (instancetype)holderForBackForwardListItem:(WKBackForwardListItem*)item;
- (instancetype)init NS_UNAVAILABLE;
// Designated init method that associates the new instance with |item|.
- (instancetype)initWithBackForwardListItem:(WKBackForwardListItem*)item;
// Returns the NavigationItemImpl stored in this instance.
- (web::NavigationItemImpl*)navigationItem;
// Stores the NavigationItemImpl object in this instance.
- (void)setNavigationItem: