blob: 7a260810562729a904de18110572406fd5f89ca8 [file] [log] [blame]
Avi Drissman4e1b7bc32022-09-15 14:03:501// Copyright 2013 The Chromium Authors
danakjc492bf82020-09-09 20:02:442// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5#ifndef CONTENT_BROWSER_RENDERER_HOST_NAVIGATION_CONTROLLER_DELEGATE_H_
6#define CONTENT_BROWSER_RENDERER_HOST_NAVIGATION_CONTROLLER_DELEGATE_H_
7
8#include <stdint.h>
9
danakjc492bf82020-09-09 20:02:4410#include "content/public/browser/invalidate_type.h"
11#include "content/public/browser/navigation_controller.h"
12#include "content/public/browser/navigation_details.h"
danakjc492bf82020-09-09 20:02:4413
14namespace content {
15
16struct LoadCommittedDetails;
danakjc492bf82020-09-09 20:02:4417
18// Interface for objects embedding a NavigationController to provide the
19// functionality NavigationController needs.
danakjc492bf82020-09-09 20:02:4420class NavigationControllerDelegate {
21 public:
22 virtual ~NavigationControllerDelegate() {}
23
Abhijeet Kandalkar3dc6e602022-11-09 05:08:3724 virtual void NotifyNavigationStateChangedFromController(
25 InvalidateTypes changed_flags) = 0;
danakjc492bf82020-09-09 20:02:4426
27 // Methods from WebContentsImpl that NavigationControllerImpl needs to
Matt Falkenhagen548ed1562021-07-06 01:38:2628 // call. NavigationControllerImpl cannot call them directly because
29 // renderer_host/ cannot depend on WebContents.
danakjc492bf82020-09-09 20:02:4430 virtual void NotifyBeforeFormRepostWarningShow() = 0;
31 virtual void NotifyNavigationEntryCommitted(
32 const LoadCommittedDetails& load_details) = 0;
33 virtual void NotifyNavigationEntryChanged(
34 const EntryChangedDetails& change_details) = 0;
35 virtual void NotifyNavigationListPruned(
36 const PrunedDetails& pruned_details) = 0;
37 virtual void NotifyNavigationEntriesDeleted() = 0;
danakjc492bf82020-09-09 20:02:4438 virtual void ActivateAndShowRepostFormWarningDialog() = 0;
danakjc492bf82020-09-09 20:02:4439
40 // Returns whether URLs for aborted browser-initiated navigations should be
41 // preserved in the omnibox. Defaults to false.
42 virtual bool ShouldPreserveAbortedURLs() = 0;
43
danakjc492bf82020-09-09 20:02:4444 virtual void UpdateOverridingUserAgent() = 0;
45};
46
47} // namespace content
48
49#endif // CONTENT_BROWSER_RENDERER_HOST_NAVIGATION_CONTROLLER_DELEGATE_H_