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

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

Issue 2698413004: Implemented WebStateObserver::DidFinishNavigation(NavigationHandle*). (Closed)
Patch Set: Self review Created 3 years, 10 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_HANDLE_H_
6 #define IOS_WEB_PUBLIC_WEB_STATE_NAVIGATION_HANDLE_H_
7
8 #include "net/base/net_errors.h"
kkhorimoto 2017/02/22 01:42:37 It doesn't look like this is needed here.
Eugene But (OOO till 7-30) 2017/02/22 17:54:32 Done.
9
10 class GURL;
11
12 namespace web {
13
14 class WebState;
15
16 // Tracks information related to a single navigation. NavigationHandle is
marq (ping after 24h) 2017/02/22 13:26:36 nit: 'A NavigationHandle'.
Eugene But (OOO till 7-30) 2017/02/22 17:54:32 Done.
17 // provided to WebStateObserver methods to allow observers to track specific
18 // navigations and their details. Observers should clear any references to a
19 // NavigationHandle at the time of WebStateObserver::DidFinishNavigation, just
20 // before the handle is destroyed.
21 class NavigationHandle {
marq (ping after 24h) 2017/02/22 13:26:36 'Handle' is usually used to mean a pointer to a po
Eugene But (OOO till 7-30) 2017/02/22 17:54:32 NavigationHandle was content term. But I agree tha
22 public:
23 // The WebState the navigation is taking place in.
24 virtual WebState* GetWebState() = 0;
kkhorimoto 2017/02/22 01:42:37 This is only used by a WSO callback right? If so,
Eugene But (OOO till 7-30) 2017/02/22 17:54:32 This is modeled from content, which has Navigation
kkhorimoto 2017/02/22 18:38:05 It looks like GlobalWebStateObserver includes anal
Eugene But (OOO till 7-30) 2017/02/22 21:44:56 I don't think there is a difference here between w
kkhorimoto 2017/02/22 21:55:44 Hmm, yeah you have a good point. My main reason f
Eugene But (OOO till 7-30) 2017/02/22 22:08:32 LoadCommittedDetails is always passed as a referen
25
26 // The URL the frame is navigating to.
marq (ping after 24h) 2017/02/22 13:26:36 Not clear what 'frame' means in this context.
Eugene But (OOO till 7-30) 2017/02/22 17:54:32 Changed to "The URL the WebState is navigating to.
27 virtual const GURL& GetUrl() const = 0;
kkhorimoto 2017/02/22 01:42:37 Other public web// interfaces use "URL" (which, a
Eugene But (OOO till 7-30) 2017/02/22 17:54:33 Well, there is no real consistency, and URL is pro
28
29 // Whether the navigation happened in the same page. Examples of same page
30 // navigations are:
31 // * reference fragment navigations
32 // * pushState/replaceState
33 // * same page history navigation
34 virtual bool IsSamePage() const = 0;
kkhorimoto 2017/02/22 01:42:37 s/Page/Document
Eugene But (OOO till 7-30) 2017/02/22 17:54:32 This is modeled from content and I would like to u
kkhorimoto 2017/02/22 18:38:05 While I agree that cross-platform consistency is i
Eugene But (OOO till 7-30) 2017/02/22 21:44:56 I started discussion with folks who wrote the orig
kkhorimoto 2017/02/22 21:55:44 Great, thanks for that!
35
36 // Whether the navigation resulted in an error page.
37 virtual bool IsErrorPage() const = 0;
38
39 virtual ~NavigationHandle() {}
40 };
41
42 } // namespace web
43
44 #endif // IOS_WEB_PUBLIC_WEB_STATE_NAVIGATION_HANDLE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698