Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(688)

Side by Side Diff: ios/web/navigation/crw_session_entry.h

Issue 1028603004: Upstream ios/web/navigation (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@ios-testing
Patch Set: Rebase and resync Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2012 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.
4
5 #ifndef IOS_WEB_NAVIGATION_CRW_SESSION_ENTRY_H_
6 #define IOS_WEB_NAVIGATION_CRW_SESSION_ENTRY_H_
7
8 #import <Foundation/Foundation.h>
9
10 #include "base/memory/scoped_ptr.h"
11 #include "base/strings/string16.h"
12 #include "base/time/time.h"
13 #include "ui/base/page_transition_types.h"
14 #include "url/gurl.h"
15
16 namespace web {
17 class NavigationItem;
18 struct Referrer;
19 }
20
21 // A CRWSessionEntry is similar to a NavigationEntry object in desktop Chrome.
22 // It maintains the information needed to save/restore a single entry in session
23 // history (i.e., one site) for a tab. A tab may have multiple of these objects
24 // comprising its entire session history.
25 // TODO(rohitrao): Fold CRWSessionEntry's logic into NavigationItem.
26 @interface CRWSessionEntry : NSObject<NSCoding, NSCopying>
27
28 @property(nonatomic, assign) NSInteger index;
29 @property(nonatomic, readonly) const GURL& originalUrl;
30 @property(nonatomic, assign) BOOL useDesktopUserAgent;
31 @property(nonatomic, assign) BOOL usedDataReductionProxy;
32 @property(nonatomic, retain) NSString* serializedStateObject;
33 @property(nonatomic, assign) BOOL createdFromPushState;
34 @property(nonatomic, retain) NSData* POSTData;
35 @property(nonatomic, readonly) NSDictionary* httpHeaders;
36 @property(nonatomic, assign) BOOL skipResubmitDataConfirmation;
37
38 // Initialize the session entry with the given url.
39 - (id)initWithUrl:(const GURL&)url
40 referrer:(const web::Referrer&)referrer
41 transition:(ui::PageTransition)transition
42 useDesktopUserAgent:(BOOL)useDesktopUserAgent
43 rendererInitiated:(BOOL)rendererInitiated;
44
45 // Initialize the session entry with the given NavigationItem.
46 - (id)initWithNavigationItem:(scoped_ptr<web::NavigationItem>)item
47 index:(int)index;
48
49 // Returns a pointer to the NavigationItem associated with this CRWSessionEntry.
50 // Eventually, this will replace CRWSessionEntry entirely.
51 - (web::NavigationItem*)navigationItem;
52
53 // Adds headers from |moreHTTPHeaders| to |httpHeaders|; existing headers with
54 // the same key will be overridden.
55 - (void)addHTTPHeaders:(NSDictionary*)moreHTTPHeaders;
56
57 // Removes the header for the given key from |httpHeaders|.
58 - (void)removeHTTPHeaderForKey:(NSString*)key;
59
60 // Resets |httpHeaders| to nil.
61 - (void)resetHTTPHeaders;
62
63 @end
64
65 #endif // IOS_WEB_NAVIGATION_CRW_SESSION_ENTRY_H_
OLDNEW
« no previous file with comments | « ios/web/navigation/crw_session_controller_unittest.mm ('k') | ios/web/navigation/crw_session_entry.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698