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
3 // found in the LICENSE file.
5 #ifndef CONTENT_PUBLIC_BROWSER_NAVIGATION_HANDLE_H_
6 #define CONTENT_PUBLIC_BROWSER_NAVIGATION_HANDLE_H_
8 #include "content/common/content_export.h"
9 #include "net/base/net_errors.h"
15 // A NavigationHandle tracks information related to a single navigation.
16 class CONTENT_EXPORT NavigationHandle
{
18 virtual ~NavigationHandle() {}
20 // The URL the frame is navigating to. This may change during the navigation
21 // when encountering a server redirect.
22 virtual const GURL
& GetURL() const = 0;
24 // The net error code if an error happened prior to commit. Otherwise it will
26 virtual net::Error
GetNetErrorCode() const = 0;
28 // Whether the navigation is taking place in the main frame or in a subframe.
29 virtual bool IsInMainFrame() const = 0;
31 // Whether the navigation has successfully committed a document.
32 virtual bool HasCommittedDocument() const = 0;
34 // Whether an error page has committed for the navigation.
35 virtual bool HasCommittedErrorPage() const = 0;
38 } // namespace content
40 #endif // CONTENT_PUBLIC_BROWSER_NAVIGATION_HANDLE_H_