OLD | NEW |
1 // Copyright 2012 The Chromium Authors. All rights reserved. | 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 | 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_NAVIGATION_CRW_SESSION_CONTROLLER_H_ | 5 #ifndef IOS_WEB_NAVIGATION_CRW_SESSION_CONTROLLER_H_ |
6 #define IOS_WEB_NAVIGATION_CRW_SESSION_CONTROLLER_H_ | 6 #define IOS_WEB_NAVIGATION_CRW_SESSION_CONTROLLER_H_ |
7 | 7 |
8 #import <Foundation/Foundation.h> | 8 #import <Foundation/Foundation.h> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
11 #include "ios/web/public/navigation_item_list.h" | 11 #import "ios/web/navigation/navigation_item_impl_list.h" |
12 #include "ui/base/page_transition_types.h" | 12 #include "ui/base/page_transition_types.h" |
13 #include "url/gurl.h" | 13 #include "url/gurl.h" |
14 | 14 |
15 @class CRWSessionEntry; | 15 @class CRWSessionEntry; |
16 @class CRWSessionCertificatePolicyManager; | 16 @class CRWSessionCertificatePolicyManager; |
17 | 17 |
18 namespace web { | 18 namespace web { |
19 class BrowserState; | 19 class BrowserState; |
20 class NavigationManagerImpl; | 20 class NavigationManagerImpl; |
21 struct Referrer; | 21 struct Referrer; |
(...skipping 16 matching lines...) Expand all Loading... |
38 @property(nonatomic, copy) NSString* windowName; | 38 @property(nonatomic, copy) NSString* windowName; |
39 // Indicates whether the page was opened by DOM (e.g. with |window.open| | 39 // Indicates whether the page was opened by DOM (e.g. with |window.open| |
40 // JavaScript call or by clicking a link with |_blank| target). | 40 // JavaScript call or by clicking a link with |_blank| target). |
41 @property(nonatomic, readonly, getter=isOpenedByDOM) BOOL openedByDOM; | 41 @property(nonatomic, readonly, getter=isOpenedByDOM) BOOL openedByDOM; |
42 @property(nonatomic, readonly, strong) | 42 @property(nonatomic, readonly, strong) |
43 CRWSessionCertificatePolicyManager* sessionCertificatePolicyManager; | 43 CRWSessionCertificatePolicyManager* sessionCertificatePolicyManager; |
44 @property(nonatomic, assign) NSTimeInterval lastVisitedTimestamp; | 44 @property(nonatomic, assign) NSTimeInterval lastVisitedTimestamp; |
45 @property(nonatomic, readonly, copy) NSString* openerId; | 45 @property(nonatomic, readonly, copy) NSString* openerId; |
46 @property(nonatomic, readonly, assign) NSInteger openerNavigationIndex; | 46 @property(nonatomic, readonly, assign) NSInteger openerNavigationIndex; |
47 | 47 |
48 // The list of CRWSessionEntries in |_entries|'s NavigationItemImpls. | 48 // The ScopedNavigationItemImplList used to store the NavigationItemImpls for |
49 @property(nonatomic, readonly) web::NavigationItemList items; | 49 // this session. |
| 50 @property(nonatomic, readonly) const web::ScopedNavigationItemImplList& items; |
50 // The current NavigationItem. During a pending navigation, returns the | 51 // The current NavigationItem. During a pending navigation, returns the |
51 // NavigationItem for that navigation. If a transient NavigationItem exists, | 52 // NavigationItem for that navigation. If a transient NavigationItem exists, |
52 // this NavigationItem will be returned. | 53 // this NavigationItem will be returned. |
53 @property(nonatomic, readonly) web::NavigationItemImpl* currentItem; | 54 @property(nonatomic, readonly) web::NavigationItemImpl* currentItem; |
54 // Returns the NavigationItem whose URL should be displayed to the user. | 55 // Returns the NavigationItem whose URL should be displayed to the user. |
55 @property(nonatomic, readonly) web::NavigationItemImpl* visibleItem; | 56 @property(nonatomic, readonly) web::NavigationItemImpl* visibleItem; |
56 // Returns the NavigationItem corresponding to a load for which no data has yet | 57 // Returns the NavigationItem corresponding to a load for which no data has yet |
57 // been received. | 58 // been received. |
58 @property(nonatomic, readonly) web::NavigationItemImpl* pendingItem; | 59 @property(nonatomic, readonly) web::NavigationItemImpl* pendingItem; |
59 // Returns the NavigationItem corresponding with a transient navigation (i.e. | 60 // Returns the NavigationItem corresponding with a transient navigation (i.e. |
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
155 // Set |useDesktopUserAgentForNextPendingItem_| to YES if there is no pending | 156 // Set |useDesktopUserAgentForNextPendingItem_| to YES if there is no pending |
156 // entry, otherwise set |useDesktopUserAgent| in the pending entry. | 157 // entry, otherwise set |useDesktopUserAgent| in the pending entry. |
157 - (void)useDesktopUserAgentForNextPendingItem; | 158 - (void)useDesktopUserAgentForNextPendingItem; |
158 | 159 |
159 // Returns the index of |item| in |items|. | 160 // Returns the index of |item| in |items|. |
160 - (NSInteger)indexOfItem:(web::NavigationItem*)item; | 161 - (NSInteger)indexOfItem:(web::NavigationItem*)item; |
161 | 162 |
162 @end | 163 @end |
163 | 164 |
164 #endif // IOS_WEB_NAVIGATION_CRW_SESSION_CONTROLLER_H_ | 165 #endif // IOS_WEB_NAVIGATION_CRW_SESSION_CONTROLLER_H_ |
OLD | NEW |