Avi Drissman | 4e1b7bc3 | 2022-09-15 14:03:50 | [diff] [blame] | 1 | // Copyright 2013 The Chromium Authors |
danakj | c492bf8 | 2020-09-09 20:02:44 | [diff] [blame] | 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 CONTENT_BROWSER_RENDERER_HOST_NAVIGATION_CONTROLLER_DELEGATE_H_ |
| 6 | #define CONTENT_BROWSER_RENDERER_HOST_NAVIGATION_CONTROLLER_DELEGATE_H_ |
| 7 | |
| 8 | #include <stdint.h> |
| 9 | |
danakj | c492bf8 | 2020-09-09 20:02:44 | [diff] [blame] | 10 | #include "content/public/browser/invalidate_type.h" |
| 11 | #include "content/public/browser/navigation_controller.h" |
| 12 | #include "content/public/browser/navigation_details.h" |
danakj | c492bf8 | 2020-09-09 20:02:44 | [diff] [blame] | 13 | |
| 14 | namespace content { |
| 15 | |
| 16 | struct LoadCommittedDetails; |
danakj | c492bf8 | 2020-09-09 20:02:44 | [diff] [blame] | 17 | |
| 18 | // Interface for objects embedding a NavigationController to provide the |
| 19 | // functionality NavigationController needs. |
danakj | c492bf8 | 2020-09-09 20:02:44 | [diff] [blame] | 20 | class NavigationControllerDelegate { |
| 21 | public: |
| 22 | virtual ~NavigationControllerDelegate() {} |
| 23 | |
Abhijeet Kandalkar | 3dc6e60 | 2022-11-09 05:08:37 | [diff] [blame] | 24 | virtual void NotifyNavigationStateChangedFromController( |
| 25 | InvalidateTypes changed_flags) = 0; |
danakj | c492bf8 | 2020-09-09 20:02:44 | [diff] [blame] | 26 | |
| 27 | // Methods from WebContentsImpl that NavigationControllerImpl needs to |
Matt Falkenhagen | 548ed156 | 2021-07-06 01:38:26 | [diff] [blame] | 28 | // call. NavigationControllerImpl cannot call them directly because |
| 29 | // renderer_host/ cannot depend on WebContents. |
danakj | c492bf8 | 2020-09-09 20:02:44 | [diff] [blame] | 30 | 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; |
danakj | c492bf8 | 2020-09-09 20:02:44 | [diff] [blame] | 38 | virtual void ActivateAndShowRepostFormWarningDialog() = 0; |
danakj | c492bf8 | 2020-09-09 20:02:44 | [diff] [blame] | 39 | |
| 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 | |
danakj | c492bf8 | 2020-09-09 20:02:44 | [diff] [blame] | 44 | virtual void UpdateOverridingUserAgent() = 0; |
| 45 | }; |
| 46 | |
| 47 | } // namespace content |
| 48 | |
| 49 | #endif // CONTENT_BROWSER_RENDERER_HOST_NAVIGATION_CONTROLLER_DELEGATE_H_ |