| 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 |
| (...skipping 26 matching lines...) Expand all Loading... |
| 37 // corresponds with a new navigation (created by addPendingItem:). | 37 // corresponds with a new navigation (created by addPendingItem:). |
| 38 @property(nonatomic, readwrite, assign) NSInteger pendingItemIndex; | 38 @property(nonatomic, readwrite, assign) NSInteger pendingItemIndex; |
| 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 | 44 |
| 45 // The list of CRWSessionEntries in |_entries|'s NavigationItemImpls. | 45 // The list of CRWSessionEntries in |_entries|'s NavigationItemImpls. |
| 46 @property(nonatomic, readonly) web::NavigationItemList items; | 46 @property(nonatomic, readonly) web::NavigationItemList items; |
| 47 // The number of elements in |self.items|. |
| 48 @property(nonatomic, readonly) NSUInteger itemCount; |
| 47 // The current NavigationItem. During a pending navigation, returns the | 49 // The current NavigationItem. During a pending navigation, returns the |
| 48 // NavigationItem for that navigation. If a transient NavigationItem exists, | 50 // NavigationItem for that navigation. If a transient NavigationItem exists, |
| 49 // this NavigationItem will be returned. | 51 // this NavigationItem will be returned. |
| 50 @property(nonatomic, readonly) web::NavigationItemImpl* currentItem; | 52 @property(nonatomic, readonly) web::NavigationItemImpl* currentItem; |
| 51 // Returns the NavigationItem whose URL should be displayed to the user. | 53 // Returns the NavigationItem whose URL should be displayed to the user. |
| 52 @property(nonatomic, readonly) web::NavigationItemImpl* visibleItem; | 54 @property(nonatomic, readonly) web::NavigationItemImpl* visibleItem; |
| 53 // Returns the NavigationItem corresponding to a load for which no data has yet | 55 // Returns the NavigationItem corresponding to a load for which no data has yet |
| 54 // been received. | 56 // been received. |
| 55 @property(nonatomic, readonly) web::NavigationItemImpl* pendingItem; | 57 @property(nonatomic, readonly) web::NavigationItemImpl* pendingItem; |
| 56 // Returns the NavigationItem corresponding with a transient navigation (i.e. | 58 // Returns the NavigationItem corresponding with a transient navigation (i.e. |
| (...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 145 - (void)removeItemAtIndex:(NSInteger)index; | 147 - (void)removeItemAtIndex:(NSInteger)index; |
| 146 | 148 |
| 147 // Determines whether a navigation between |firstEntry| and |secondEntry| is a | 149 // Determines whether a navigation between |firstEntry| and |secondEntry| is a |
| 148 // same-document navigation. Entries can be passed in any order. | 150 // same-document navigation. Entries can be passed in any order. |
| 149 - (BOOL)isSameDocumentNavigationBetweenItem:(web::NavigationItem*)firstItem | 151 - (BOOL)isSameDocumentNavigationBetweenItem:(web::NavigationItem*)firstItem |
| 150 andItem:(web::NavigationItem*)secondItem; | 152 andItem:(web::NavigationItem*)secondItem; |
| 151 | 153 |
| 152 // Returns the index of |item| in |items|. | 154 // Returns the index of |item| in |items|. |
| 153 - (NSInteger)indexOfItem:(const web::NavigationItem*)item; | 155 - (NSInteger)indexOfItem:(const web::NavigationItem*)item; |
| 154 | 156 |
| 157 // Returns the item at |index| in |items|. |
| 158 - (web::NavigationItemImpl*)itemAtIndex:(NSInteger)index; |
| 159 |
| 155 @end | 160 @end |
| 156 | 161 |
| 157 #endif // IOS_WEB_NAVIGATION_CRW_SESSION_CONTROLLER_H_ | 162 #endif // IOS_WEB_NAVIGATION_CRW_SESSION_CONTROLLER_H_ |
| OLD | NEW |