Pin Chrome's shortcut to the Win10 Start menu on install and OS upgrade.
[chromium-blink-merge.git] / content / browser / frame_host / navigation_controller_delegate.h
blob2532d25407fa0d532f7b0aad872273758ea01526
1 // Copyright 2013 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_BROWSER_FRAME_HOST_NAVIGATION_CONTROLLER_DELEGATE_H_
6 #define CONTENT_BROWSER_FRAME_HOST_NAVIGATION_CONTROLLER_DELEGATE_H_
8 #include <string>
9 #include "content/public/browser/invalidate_type.h"
10 #include "content/public/browser/navigation_controller.h"
11 #include "content/public/browser/navigation_details.h"
13 namespace content {
15 struct LoadCommittedDetails;
16 struct LoadNotificationDetails;
17 struct NativeWebKeyboardEvent;
18 class FrameTree;
19 class InterstitialPage;
20 class InterstitialPageImpl;
21 class RenderFrameHost;
22 class RenderViewHost;
23 class SiteInstance;
24 class WebContents;
25 class WebContentsDelegate;
27 // Interface for objects embedding a NavigationController to provide the
28 // functionality NavigationController needs.
29 // TODO(nasko): This interface should exist for short amount of time, while
30 // we transition navigation code from WebContents to Navigator.
31 class NavigationControllerDelegate {
32 public:
33 virtual ~NavigationControllerDelegate() {}
35 // Duplicates of WebContents methods.
36 virtual RenderViewHost* GetRenderViewHost() const = 0;
37 virtual InterstitialPage* GetInterstitialPage() const = 0;
38 virtual const std::string& GetContentsMimeType() const = 0;
39 virtual void NotifyNavigationStateChanged(InvalidateTypes changed_flags) = 0;
40 virtual void Stop() = 0;
41 virtual SiteInstance* GetPendingSiteInstance() const = 0;
42 virtual int32 GetMaxPageID() = 0;
43 virtual int32 GetMaxPageIDForSiteInstance(SiteInstance* site_instance) = 0;
44 virtual bool IsLoading() const = 0;
45 virtual bool IsBeingDestroyed() const = 0;
46 virtual bool CanOverscrollContent() const = 0;
48 // Methods from WebContentsImpl that NavigationControllerImpl needs to
49 // call.
50 virtual FrameTree* GetFrameTree() = 0;
51 virtual void NotifyBeforeFormRepostWarningShow() = 0;
52 virtual void NotifyNavigationEntryCommitted(
53 const LoadCommittedDetails& load_details) = 0;
54 virtual void SetHistoryOffsetAndLength(int history_offset,
55 int history_length) = 0;
56 virtual void CopyMaxPageIDsFrom(WebContents* web_contents) = 0;
57 virtual void UpdateMaxPageID(int32 page_id) = 0;
58 virtual void UpdateMaxPageIDForSiteInstance(SiteInstance* site_instance,
59 int32 page_id) = 0;
60 virtual void ActivateAndShowRepostFormWarningDialog() = 0;
61 virtual bool HasAccessedInitialDocument() = 0;
63 // This method is needed, since we are no longer guaranteed that the
64 // embedder for NavigationController will be a WebContents object.
65 virtual WebContents* GetWebContents() = 0;
67 // Methods needed by InterstitialPageImpl.
68 virtual bool IsHidden() = 0;
69 virtual void RenderFrameForInterstitialPageCreated(
70 RenderFrameHost* render_frame_host) = 0;
71 virtual void AttachInterstitialPage(
72 InterstitialPageImpl* interstitial_page) = 0;
73 virtual void DetachInterstitialPage() = 0;
74 virtual void SetIsLoading(bool is_loading,
75 bool to_different_document,
76 LoadNotificationDetails* details) = 0;
79 } // namespace content
81 #endif // CONTENT_BROWSER_FRAME_HOST_NAVIGATION_CONTROLLER_DELEGATE_H_