Switch global error menu icon to vectorized MD asset
[chromium-blink-merge.git] / content / public / browser / navigation_handle.h
blob49d0884de43256e204ad3159903db42e889d1af6
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"
11 class GURL;
13 namespace content {
15 // A NavigationHandle tracks information related to a single navigation.
16 class CONTENT_EXPORT NavigationHandle {
17 public:
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
25 // be net::OK.
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_