OLD | NEW |
---|---|
1 // Copyright 2017 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef IOS_WEB_PUBLIC_CRW_NAVIGATION_ITEM_STORAGE_H_ | 5 #ifndef IOS_WEB_PUBLIC_CRW_NAVIGATION_ITEM_STORAGE_H_ |
6 #define IOS_WEB_PUBLIC_CRW_NAVIGATION_ITEM_STORAGE_H_ | 6 #define IOS_WEB_PUBLIC_CRW_NAVIGATION_ITEM_STORAGE_H_ |
7 | 7 |
8 #import <Foundation/Foundation.h> | 8 #import <Foundation/Foundation.h> |
9 #include <stddef.h> | 9 #include <stddef.h> |
10 | 10 |
11 #include "base/strings/string16.h" | 11 #include "base/strings/string16.h" |
12 #include "base/time/time.h" | 12 #include "base/time/time.h" |
13 #include "ios/web/public/referrer.h" | 13 #include "ios/web/public/referrer.h" |
14 #include "ios/web/public/user_agent.h" | |
14 #import "ios/web/public/web_state/page_display_state.h" | 15 #import "ios/web/public/web_state/page_display_state.h" |
15 #include "url/gurl.h" | 16 #include "url/gurl.h" |
16 | 17 |
17 namespace web { | 18 namespace web { |
18 | 19 |
19 // Keys used to serialize navigation properties. | 20 // Keys used to serialize navigation properties. |
20 | 21 |
21 // Current URL (std::string). | 22 // Current URL (std::string). |
22 extern NSString* const kNavigationItemStorageURLKey; | 23 extern NSString* const kNavigationItemStorageURLKey; |
23 // Current URL. Deprecated, used for backward compatibility (NSURL). | 24 // Current URL. Deprecated, used for backward compatibility (NSURL). |
(...skipping 10 matching lines...) Expand all Loading... | |
34 extern NSString* const kNavigationItemStorageTitleKey; | 35 extern NSString* const kNavigationItemStorageTitleKey; |
35 // The PageDisplayState (NSDictionary). | 36 // The PageDisplayState (NSDictionary). |
36 extern NSString* const kNavigationItemStoragePageDisplayStateKey; | 37 extern NSString* const kNavigationItemStoragePageDisplayStateKey; |
37 // POST request data (NSData). | 38 // POST request data (NSData). |
38 extern NSString* const kNavigationItemStoragePOSTDataKey; | 39 extern NSString* const kNavigationItemStoragePOSTDataKey; |
39 // HTTP request headers (NSDictionary). | 40 // HTTP request headers (NSDictionary). |
40 extern NSString* const kNavigationItemStorageHTTPRequestHeadersKey; | 41 extern NSString* const kNavigationItemStorageHTTPRequestHeadersKey; |
41 // Whether or not to bypass showing the resubmit data confirmation when loading | 42 // Whether or not to bypass showing the resubmit data confirmation when loading |
42 // a POST request (BOOL). | 43 // a POST request (BOOL). |
43 extern NSString* const kNavigationItemStorageSkipRepostFormConfirmationKey; | 44 extern NSString* const kNavigationItemStorageSkipRepostFormConfirmationKey; |
44 // Should desktop user agent be used (BOOL)? | 45 // The user agent type (std::string). |
45 extern NSString* const kNavigationItemStorageUseDesktopUserAgentKey; | 46 extern NSString* const kNavigationItemStorageUserAgentTypeKey; |
47 // Should desktop user agent be used (BOOL). Deprecated, used for backward | |
48 // compatibility | |
49 extern NSString* const kNavigationItemStorageUseDesktopUserAgentDeprecatedKey; | |
Eugene But (OOO till 7-30)
2017/02/25 01:51:52
Do you want to add TODO for deprecating this key?
kkhorimoto
2017/02/27 23:29:04
Done.
| |
46 | 50 |
47 } // namespace web | 51 } // namespace web |
48 | 52 |
49 // NSCoding-compliant class used to serialize NavigationItem's persisted | 53 // NSCoding-compliant class used to serialize NavigationItem's persisted |
50 // properties. | 54 // properties. |
51 @interface CRWNavigationItemStorage : NSObject<NSCoding> | 55 @interface CRWNavigationItemStorage : NSObject<NSCoding> |
52 | 56 |
53 @property(nonatomic, assign) GURL virtualURL; | 57 @property(nonatomic, assign) GURL virtualURL; |
54 @property(nonatomic, assign) web::Referrer referrer; | 58 @property(nonatomic, assign) web::Referrer referrer; |
55 @property(nonatomic, assign) base::Time timestamp; | 59 @property(nonatomic, assign) base::Time timestamp; |
56 @property(nonatomic, assign) base::string16 title; | 60 @property(nonatomic, assign) base::string16 title; |
57 @property(nonatomic, assign) web::PageDisplayState displayState; | 61 @property(nonatomic, assign) web::PageDisplayState displayState; |
58 @property(nonatomic, assign) BOOL shouldSkipRepostFormConfirmation; | 62 @property(nonatomic, assign) BOOL shouldSkipRepostFormConfirmation; |
59 @property(nonatomic, assign, getter=isOverridingUserAgent) | 63 @property(nonatomic, assign) web::UserAgentType userAgentType; |
60 BOOL overridingUserAgent; | |
61 @property(nonatomic, copy) NSData* POSTData; | 64 @property(nonatomic, copy) NSData* POSTData; |
62 @property(nonatomic, copy) NSDictionary* HTTPRequestHeaders; | 65 @property(nonatomic, copy) NSDictionary* HTTPRequestHeaders; |
63 | 66 |
64 @end | 67 @end |
65 | 68 |
66 #endif // IOS_WEB_PUBLIC_CRW_NAVIGATION_ITEM_STORAGE_H_ | 69 #endif // IOS_WEB_PUBLIC_CRW_NAVIGATION_ITEM_STORAGE_H_ |
OLD | NEW |