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

Side by Side Diff: ios/web/public/web_state/navigation_context.h

Issue 2698413004: Implemented WebStateObserver::DidFinishNavigation(NavigationHandle*). (Closed)
Patch Set: Addressed review comments Created 3 years, 9 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
(Empty)
1 // Copyright 2017 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef IOS_WEB_PUBLIC_WEB_STATE_NAVIGATION_CONTEXT_H_
6 #define IOS_WEB_PUBLIC_WEB_STATE_NAVIGATION_CONTEXT_H_
7
8 class GURL;
9
10 namespace web {
11
12 class WebState;
13
14 // Tracks information related to a single navigation. A NavigationContext is
15 // provided to WebStateObserver methods to allow observers to track specific
16 // navigations and their details. Observers should clear any references to a
17 // NavigationContext at the time of WebStateObserver::DidFinishNavigation, just
18 // before the handle is destroyed.
19 class NavigationContext {
20 public:
21 // The WebState the navigation is taking place in.
22 virtual WebState* GetWebState() = 0;
23
24 // The URL the WebState is navigating to.
25 virtual const GURL& GetUrl() const = 0;
26
27 // Whether the navigation happened in the same page. Examples of same page
28 // navigations are:
29 // * reference fragment navigations
30 // * pushState/replaceState
31 // * same page history navigation
32 virtual bool IsSamePage() const = 0;
33
34 // Whether the navigation resulted in an error page.
35 virtual bool IsErrorPage() const = 0;
36
37 virtual ~NavigationContext() {}
38 };
39
40 } // namespace web
41
42 #endif // IOS_WEB_PUBLIC_WEB_STATE_NAVIGATION_CONTEXT_H_
OLDNEW
« no previous file with comments | « ios/web/public/test/fakes/test_web_client.mm ('k') | ios/web/public/web_state/ui/crw_web_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698