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

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

Issue 2794723002: Create new pending item if UserAgentOverrideOption is not INHERIT. (Closed)
Patch Set: self review Created 3 years, 8 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
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 #import "ios/web/navigation/navigation_item_impl_list.h" 11 #import "ios/web/navigation/navigation_item_impl_list.h"
12 #import "ios/web/public/navigation_manager.h"
12 #include "ui/base/page_transition_types.h" 13 #include "ui/base/page_transition_types.h"
13 #include "url/gurl.h" 14 #include "url/gurl.h"
14 15
15 @class CRWSessionCertificatePolicyManager; 16 @class CRWSessionCertificatePolicyManager;
16 17
17 namespace web { 18 namespace web {
18 class BrowserState; 19 class BrowserState;
19 class NavigationItemImpl; 20 class NavigationItemImpl;
20 class NavigationManagerImpl; 21 class NavigationManagerImpl;
21 enum class NavigationInitiationType; 22 enum class NavigationInitiationType;
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 75
75 // CRWSessionController doesn't have public constructors. New 76 // CRWSessionController doesn't have public constructors. New
76 // CRWSessionControllers are created by deserialization, or via a 77 // CRWSessionControllers are created by deserialization, or via a
77 // NavigationManager. 78 // NavigationManager.
78 79
79 // Sets the corresponding NavigationManager. 80 // Sets the corresponding NavigationManager.
80 - (void)setNavigationManager:(web::NavigationManagerImpl*)navigationManager; 81 - (void)setNavigationManager:(web::NavigationManagerImpl*)navigationManager;
81 // Sets the corresponding BrowserState. 82 // Sets the corresponding BrowserState.
82 - (void)setBrowserState:(web::BrowserState*)browserState; 83 - (void)setBrowserState:(web::BrowserState*)browserState;
83 84
84 // Add a new item with the given url, referrer, and navigation type, making it 85 // Add a new item with the given url, referrer, navigation type and user agent
85 // the current item. If pending item is the same as current item, this does 86 // override option, making it the current item. If pending item is the same as
86 // nothing. |referrer| may be nil if there isn't one. The item starts out as 87 // current item, this does nothing. |referrer| may be nil if there isn't one.
87 // pending, and will be lost unless |-commitPendingItem| is called. 88 // The item starts out as pending, and will be lost unless |-commitPendingItem|
89 // is called.
88 - (void)addPendingItem:(const GURL&)url 90 - (void)addPendingItem:(const GURL&)url
89 referrer:(const web::Referrer&)referrer 91 referrer:(const web::Referrer&)referrer
90 transition:(ui::PageTransition)type 92 transition:(ui::PageTransition)type
91 initiationType:(web::NavigationInitiationType)initiationType; 93 initiationType:(web::NavigationInitiationType)initiationType
94 userAgentOverrideOption:(web::NavigationManager::UserAgentOverrideOption)
95 userAgentOverrideOption;
92 96
93 // Updates the URL of the yet to be committed pending item. Useful for page 97 // Updates the URL of the yet to be committed pending item. Useful for page
94 // redirects. Does nothing if there is no pending item. 98 // redirects. Does nothing if there is no pending item.
95 - (void)updatePendingItem:(const GURL&)url; 99 - (void)updatePendingItem:(const GURL&)url;
96 100
97 // Commits the current pending item. No changes are made to the item during 101 // Commits the current pending item. No changes are made to the item during
98 // this process, it is just moved from pending to committed. 102 // this process, it is just moved from pending to committed.
99 // TODO(pinkerton): Desktop Chrome broadcasts a notification here, should we? 103 // TODO(pinkerton): Desktop Chrome broadcasts a notification here, should we?
100 - (void)commitPendingItem; 104 - (void)commitPendingItem;
101 105
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
148 152
149 // Returns the index of |item| in |items|. 153 // Returns the index of |item| in |items|.
150 - (NSInteger)indexOfItem:(const web::NavigationItem*)item; 154 - (NSInteger)indexOfItem:(const web::NavigationItem*)item;
151 155
152 // Returns the item at |index| in |items|. 156 // Returns the item at |index| in |items|.
153 - (web::NavigationItemImpl*)itemAtIndex:(NSInteger)index; 157 - (web::NavigationItemImpl*)itemAtIndex:(NSInteger)index;
154 158
155 @end 159 @end
156 160
157 #endif // IOS_WEB_NAVIGATION_CRW_SESSION_CONTROLLER_H_ 161 #endif // IOS_WEB_NAVIGATION_CRW_SESSION_CONTROLLER_H_
OLDNEW
« no previous file with comments | « no previous file | ios/web/navigation/crw_session_controller.mm » ('j') | ios/web/navigation/crw_session_controller.mm » ('J')

Powered by Google App Engine
This is Rietveld 408576698