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

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: Address comments 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 namespace web { 16 namespace web {
16 class BrowserState; 17 class BrowserState;
17 class NavigationItemImpl; 18 class NavigationItemImpl;
18 class NavigationManagerImpl; 19 class NavigationManagerImpl;
19 enum class NavigationInitiationType; 20 enum class NavigationInitiationType;
20 struct Referrer; 21 struct Referrer;
21 } 22 }
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 71
71 // CRWSessionController doesn't have public constructors. New 72 // CRWSessionController doesn't have public constructors. New
72 // CRWSessionControllers are created by deserialization, or via a 73 // CRWSessionControllers are created by deserialization, or via a
73 // NavigationManager. 74 // NavigationManager.
74 75
75 // Sets the corresponding NavigationManager. 76 // Sets the corresponding NavigationManager.
76 - (void)setNavigationManager:(web::NavigationManagerImpl*)navigationManager; 77 - (void)setNavigationManager:(web::NavigationManagerImpl*)navigationManager;
77 // Sets the corresponding BrowserState. 78 // Sets the corresponding BrowserState.
78 - (void)setBrowserState:(web::BrowserState*)browserState; 79 - (void)setBrowserState:(web::BrowserState*)browserState;
79 80
80 // Add a new item with the given url, referrer, and navigation type, making it 81 // Add a new item with the given url, referrer, navigation type and user agent
81 // the current item. If pending item is the same as current item, this does 82 // override option, making it the current item. If pending item is the same as
82 // nothing. |referrer| may be nil if there isn't one. The item starts out as 83 // current item, this does nothing. |referrer| may be nil if there isn't one.
83 // pending, and will be lost unless |-commitPendingItem| is called. 84 // The item starts out as pending, and will be lost unless |-commitPendingItem|
85 // is called.
84 - (void)addPendingItem:(const GURL&)url 86 - (void)addPendingItem:(const GURL&)url
85 referrer:(const web::Referrer&)referrer 87 referrer:(const web::Referrer&)referrer
86 transition:(ui::PageTransition)type 88 transition:(ui::PageTransition)type
87 initiationType:(web::NavigationInitiationType)initiationType; 89 initiationType:(web::NavigationInitiationType)initiationType
90 userAgentOverrideOption:(web::NavigationManager::UserAgentOverrideOption)
91 userAgentOverrideOption;
88 92
89 // Updates the URL of the yet to be committed pending item. Useful for page 93 // Updates the URL of the yet to be committed pending item. Useful for page
90 // redirects. Does nothing if there is no pending item. 94 // redirects. Does nothing if there is no pending item.
91 - (void)updatePendingItem:(const GURL&)url; 95 - (void)updatePendingItem:(const GURL&)url;
92 96
93 // Commits the current pending item. No changes are made to the item during 97 // Commits the current pending item. No changes are made to the item during
94 // this process, it is just moved from pending to committed. 98 // this process, it is just moved from pending to committed.
95 // TODO(pinkerton): Desktop Chrome broadcasts a notification here, should we? 99 // TODO(pinkerton): Desktop Chrome broadcasts a notification here, should we?
96 - (void)commitPendingItem; 100 - (void)commitPendingItem;
97 101
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
144 148
145 // Returns the index of |item| in |items|. 149 // Returns the index of |item| in |items|.
146 - (NSInteger)indexOfItem:(const web::NavigationItem*)item; 150 - (NSInteger)indexOfItem:(const web::NavigationItem*)item;
147 151
148 // Returns the item at |index| in |items|. 152 // Returns the item at |index| in |items|.
149 - (web::NavigationItemImpl*)itemAtIndex:(NSInteger)index; 153 - (web::NavigationItemImpl*)itemAtIndex:(NSInteger)index;
150 154
151 @end 155 @end
152 156
153 #endif // IOS_WEB_NAVIGATION_CRW_SESSION_CONTROLLER_H_ 157 #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