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

Side by Side Diff: content/public/browser/navigation_handle.h

Issue 1350673003: Remove WebContentsObserver::DidCommitNavigation (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed comments Created 5 years, 3 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 CONTENT_PUBLIC_BROWSER_NAVIGATION_HANDLE_H_ 5 #ifndef CONTENT_PUBLIC_BROWSER_NAVIGATION_HANDLE_H_
6 #define CONTENT_PUBLIC_BROWSER_NAVIGATION_HANDLE_H_ 6 #define CONTENT_PUBLIC_BROWSER_NAVIGATION_HANDLE_H_
7 7
8 #include "content/common/content_export.h" 8 #include "content/common/content_export.h"
9 #include "net/base/net_errors.h" 9 #include "net/base/net_errors.h"
10 10
11 class GURL; 11 class GURL;
12 12
13 namespace content { 13 namespace content {
14 class RenderFrameHost;
14 15
15 // A NavigationHandle tracks information related to a single navigation. 16 // A NavigationHandle tracks information related to a single navigation.
16 class CONTENT_EXPORT NavigationHandle { 17 class CONTENT_EXPORT NavigationHandle {
17 public: 18 public:
18 virtual ~NavigationHandle() {} 19 virtual ~NavigationHandle() {}
19 20
20 // The URL the frame is navigating to. This may change during the navigation 21 // The URL the frame is navigating to. This may change during the navigation
21 // when encountering a server redirect. 22 // when encountering a server redirect.
22 virtual const GURL& GetURL() const = 0; 23 virtual const GURL& GetURL() const = 0;
23 24
24 // The net error code if an error happened prior to commit. Otherwise it will 25 // The net error code if an error happened prior to commit. Otherwise it will
25 // be net::OK. 26 // be net::OK.
26 virtual net::Error GetNetErrorCode() const = 0; 27 virtual net::Error GetNetErrorCode() const = 0;
27 28
28 // Whether the navigation is taking place in the main frame or in a subframe. 29 // Whether the navigation is taking place in the main frame or in a subframe.
29 virtual bool IsInMainFrame() const = 0; 30 virtual bool IsInMainFrame() const = 0;
30 31
31 // Whether the navigation has successfully committed a document. 32 // Returns the RenderFrameHost this navigation is taking place in. This can
32 virtual bool HasCommittedDocument() const = 0; 33 // only be accessed after the navigation is ready to commit.
34 virtual RenderFrameHost* GetRenderFrameHost() = 0;
33 35
34 // Whether an error page has committed for the navigation. 36 // Whether the navigation has committed.
Charlie Reis 2015/09/21 16:40:42 Please also mention that this returns true for eit
clamy 2015/09/22 00:38:05 Done.
35 virtual bool HasCommittedErrorPage() const = 0; 37 virtual bool HasCommitted() = 0;
38
39 // Whether the navigation resulted in an error page.
40 virtual bool IsErrorPage() = 0;
36 }; 41 };
37 42
38 } // namespace content 43 } // namespace content
39 44
40 #endif // CONTENT_PUBLIC_BROWSER_NAVIGATION_HANDLE_H_ 45 #endif // CONTENT_PUBLIC_BROWSER_NAVIGATION_HANDLE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698