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

Side by Side Diff: ios/web/web_state/ui/crw_wk_navigation_states.h

Issue 2950853002: Gracefully handle didCommitNavigation: call after didFinishNavigation: (Closed)
Patch Set: Updated comments Created 3 years, 6 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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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_WEB_STATE_UI_CRW_WK_NAVIGATION_STATES_H_ 5 #ifndef IOS_WEB_WEB_STATE_UI_CRW_WK_NAVIGATION_STATES_H_
6 #define IOS_WEB_WEB_STATE_UI_CRW_WK_NAVIGATION_STATES_H_ 6 #define IOS_WEB_WEB_STATE_UI_CRW_WK_NAVIGATION_STATES_H_
7 7
8 #include <memory> 8 #include <memory>
9 9
10 #import <Foundation/Foundation.h> 10 #import <Foundation/Foundation.h>
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 49
50 // Adds a new navigation if it was not added yet. If navigation was already 50 // Adds a new navigation if it was not added yet. If navigation was already
51 // added then updates state for existing navigation. Updating state does not 51 // added then updates state for existing navigation. Updating state does not
52 // affect the result of |lastAddedNavigation| method. New added navigations 52 // affect the result of |lastAddedNavigation| method. New added navigations
53 // should have WKNavigationState::REQUESTED, WKNavigationState::STARTED or 53 // should have WKNavigationState::REQUESTED, WKNavigationState::STARTED or
54 // WKNavigationState::COMMITTED state. |navigation| will be held as a weak 54 // WKNavigationState::COMMITTED state. |navigation| will be held as a weak
55 // reference and will not be retained. No-op if |navigation| is null. 55 // reference and will not be retained. No-op if |navigation| is null.
56 - (void)setState:(web::WKNavigationState)state 56 - (void)setState:(web::WKNavigationState)state
57 forNavigation:(WKNavigation*)navigation; 57 forNavigation:(WKNavigation*)navigation;
58 58
59 // Returns state for a given |navigation| or NONE if navigation does not exist.
60 - (web::WKNavigationState)stateForNavigation:(WKNavigation*)navigation;
61
59 // Removes given |navigation|. Fails if |navigation| does not exist. 62 // Removes given |navigation|. Fails if |navigation| does not exist.
60 // |navigation| can be null. 63 // |navigation| can be null.
61 - (void)removeNavigation:(WKNavigation*)navigation; 64 - (void)removeNavigation:(WKNavigation*)navigation;
62 65
63 // Adds a new navigation if it was not added yet. If navigation was already 66 // Adds a new navigation if it was not added yet. If navigation was already
64 // added then updates context for existing navigation. Updating context does not 67 // added then updates context for existing navigation. Updating context does not
65 // affect the result of |lastAddedNavigation| method. |navigation| will be held 68 // affect the result of |lastAddedNavigation| method. |navigation| will be held
66 // as a weak reference and will not be retained. No-op if |navigation| is null. 69 // as a weak reference and will not be retained. No-op if |navigation| is null.
67 - (void)setContext:(std::unique_ptr<web::NavigationContextImpl>)context 70 - (void)setContext:(std::unique_ptr<web::NavigationContextImpl>)context
68 forNavigation:(WKNavigation*)navigation; 71 forNavigation:(WKNavigation*)navigation;
(...skipping 13 matching lines...) Expand all
82 // is empty. 85 // is empty.
83 - (web::WKNavigationState)lastAddedNavigationState; 86 - (web::WKNavigationState)lastAddedNavigationState;
84 87
85 // Returns navigations that are not yet committed, finished or failed. 88 // Returns navigations that are not yet committed, finished or failed.
86 // This array may contain NSNull to represent null WKNavigation. 89 // This array may contain NSNull to represent null WKNavigation.
87 - (NSSet*)pendingNavigations; 90 - (NSSet*)pendingNavigations;
88 91
89 @end 92 @end
90 93
91 #endif // IOS_WEB_WEB_STATE_UI_CRW_WK_NAVIGATION_STATES_H_ 94 #endif // IOS_WEB_WEB_STATE_UI_CRW_WK_NAVIGATION_STATES_H_
OLDNEW
« no previous file with comments | « ios/web/web_state/ui/crw_web_controller.mm ('k') | ios/web/web_state/ui/crw_wk_navigation_states.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698