| Index: ios/web/public/crw_navigation_item_storage.h
|
| diff --git a/ios/web/public/crw_navigation_item_storage.h b/ios/web/public/crw_navigation_item_storage.h
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..9cc7927f891ef689d21cefdeef932ca7e8921a37
|
| --- /dev/null
|
| +++ b/ios/web/public/crw_navigation_item_storage.h
|
| @@ -0,0 +1,66 @@
|
| +// 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.
|
| +
|
| +#ifndef IOS_WEB_PUBLIC_CRW_NAVIGATION_ITEM_STORAGE_H_
|
| +#define IOS_WEB_PUBLIC_CRW_NAVIGATION_ITEM_STORAGE_H_
|
| +
|
| +#import <Foundation/Foundation.h>
|
| +#include <stddef.h>
|
| +
|
| +#include "base/strings/string16.h"
|
| +#include "base/time/time.h"
|
| +#include "ios/web/public/referrer.h"
|
| +#import "ios/web/public/web_state/page_display_state.h"
|
| +#include "url/gurl.h"
|
| +
|
| +namespace web {
|
| +
|
| +// Keys used to serialize navigation properties.
|
| +
|
| +// Current URL (std::string).
|
| +extern NSString* const kNavigationItemStorageURLKey;
|
| +// Current URL. Deprecated, used for backward compatibility (NSURL).
|
| +extern NSString* const kNavigationItemStorageURLDeperecatedKey;
|
| +// Page referrer URL (std::string).
|
| +extern NSString* const kNavigationItemStorageReferrerURLKey;
|
| +// Page referrer URL (NSURL). Deprecated, used for backward compatibility.
|
| +extern NSString* const kNavigationItemStorageReferrerURLDeprecatedKey;
|
| +// Page referrer policy (int).
|
| +extern NSString* const kNavigationItemStorageReferrerPolicyKey;
|
| +// The time at which the last known local navigation has completed (int64_t).
|
| +extern NSString* const kNavigationItemStorageTimestampKey;
|
| +// Page title (NSString).
|
| +extern NSString* const kNavigationItemStorageTitleKey;
|
| +// The PageDisplayState (NSDictionary).
|
| +extern NSString* const kNavigationItemStoragePageDisplayStateKey;
|
| +// POST request data (NSData).
|
| +extern NSString* const kNavigationItemStoragePOSTDataKey;
|
| +// HTTP request headers (NSDictionary).
|
| +extern NSString* const kNavigationItemStorageHTTPRequestHeadersKey;
|
| +// Whether or not to bypass showing the resubmit data confirmation when loading
|
| +// a POST request (BOOL).
|
| +extern NSString* const kNavigationItemStorageSkipRepostFormConfirmationKey;
|
| +// Should desktop user agent be used (BOOL)?
|
| +extern NSString* const kNavigationItemStorageUseDesktopUserAgentKey;
|
| +
|
| +} // namespace web
|
| +
|
| +// NSCoding-compliant class used to serialize NavigationItem's persisted
|
| +// properties.
|
| +@interface CRWNavigationItemStorage : NSObject<NSCoding>
|
| +
|
| +@property(nonatomic, assign) GURL virtualURL;
|
| +@property(nonatomic, assign) web::Referrer referrer;
|
| +@property(nonatomic, assign) base::Time timestamp;
|
| +@property(nonatomic, assign) base::string16 title;
|
| +@property(nonatomic, assign) web::PageDisplayState displayState;
|
| +@property(nonatomic, assign) BOOL shouldSkipRepostFormConfirmation;
|
| +@property(nonatomic, assign, getter=isOverridingUserAgent)
|
| + BOOL overridingUserAgent;
|
| +@property(nonatomic, copy) NSData* POSTData;
|
| +@property(nonatomic, copy) NSDictionary* HTTPRequestHeaders;
|
| +
|
| +@end
|
| +
|
| +#endif // IOS_WEB_PUBLIC_CRW_NAVIGATION_ITEM_STORAGE_H_
|
|
|