summaryrefslogtreecommitdiffstats
path: root/content/browser/frame_host/navigation_controller_delegate.h
diff options
context:
space:
mode:
authornasko@chromium.org <nasko@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-10-30 21:06:40 +0000
committernasko@chromium.org <nasko@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-10-30 21:06:40 +0000
commitd4a8ca488bb83c9a77c2e8b9a8c8fb7408b6faf6 (patch)
treeda0f92e87f8655795cb2f2861e2bc964920671f4 /content/browser/frame_host/navigation_controller_delegate.h
parent9004e635f04bbba6012ecf7e525eccc65ef9b33c (diff)
downloadchromium_src-d4a8ca488bb83c9a77c2e8b9a8c8fb7408b6faf6.zip
chromium_src-d4a8ca488bb83c9a77c2e8b9a8c8fb7408b6faf6.tar.gz
chromium_src-d4a8ca488bb83c9a77c2e8b9a8c8fb7408b6faf6.tar.bz2
Move navigation and frame tree classes to a new frame_host/ directory.
This CL moves all frame tree classes, Navigation* and its dependencies from web_contents/ to a separate frame_host/ directory. BUG=304341 Review URL: https://codereview.chromium.org/49823002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@231921 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/browser/frame_host/navigation_controller_delegate.h')
-rw-r--r--content/browser/frame_host/navigation_controller_delegate.h79
1 files changed, 79 insertions, 0 deletions
diff --git a/content/browser/frame_host/navigation_controller_delegate.h b/content/browser/frame_host/navigation_controller_delegate.h
new file mode 100644
index 0000000..cb3204c
--- /dev/null
+++ b/content/browser/frame_host/navigation_controller_delegate.h
@@ -0,0 +1,79 @@
+// Copyright 2013 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CONTENT_BROWSER_FRAME_HOST_NAVIGATION_CONTROLLER_DELEGATE_H_
+#define CONTENT_BROWSER_FRAME_HOST_NAVIGATION_CONTROLLER_DELEGATE_H_
+
+#include <string>
+#include "content/public/browser/navigation_controller.h"
+#include "content/public/browser/navigation_details.h"
+
+namespace content {
+
+struct LoadCommittedDetails;
+struct LoadNotificationDetails;
+struct NativeWebKeyboardEvent;
+class InterstitialPage;
+class InterstitialPageImpl;
+class RenderViewHost;
+class SiteInstance;
+class WebContents;
+class WebContentsDelegate;
+
+// Interface for objects embedding a NavigationController to provide the
+// functionality NavigationController needs.
+// TODO(nasko): This interface should exist for short amount of time, while
+// we transition navigation code from WebContents to Navigator.
+class NavigationControllerDelegate {
+ public:
+ virtual ~NavigationControllerDelegate() {}
+
+ // Duplicates of WebContents methods.
+ virtual RenderViewHost* GetRenderViewHost() const = 0;
+ virtual InterstitialPage* GetInterstitialPage() const = 0;
+ virtual const std::string& GetContentsMimeType() const = 0;
+ virtual void NotifyNavigationStateChanged(unsigned changed_flags) = 0;
+ virtual void Stop() = 0;
+ virtual SiteInstance* GetSiteInstance() const = 0;
+ virtual SiteInstance* GetPendingSiteInstance() const = 0;
+ virtual int32 GetMaxPageID() = 0;
+ virtual int32 GetMaxPageIDForSiteInstance(SiteInstance* site_instance) = 0;
+ virtual bool IsLoading() const = 0;
+
+ // Methods from WebContentsImpl that NavigationControllerImpl needs to
+ // call.
+ virtual void NotifyBeforeFormRepostWarningShow() = 0;
+ virtual void NotifyNavigationEntryCommitted(
+ const LoadCommittedDetails& load_details) = 0;
+ virtual bool NavigateToPendingEntry(
+ NavigationController::ReloadType reload_type) = 0;
+ virtual void SetHistoryLengthAndPrune(
+ const SiteInstance* site_instance,
+ int merge_history_length,
+ int32 minimum_page_id) = 0;
+ virtual void CopyMaxPageIDsFrom(WebContents* web_contents) = 0;
+ virtual void UpdateMaxPageID(int32 page_id) = 0;
+ virtual void UpdateMaxPageIDForSiteInstance(SiteInstance* site_instance,
+ int32 page_id) = 0;
+ virtual void ActivateAndShowRepostFormWarningDialog() = 0;
+
+ // This method is needed, since we are no longer guaranteed that the
+ // embedder for NavigationController will be a WebContents object.
+ virtual WebContents* GetWebContents() = 0;
+
+ // Methods needed by InterstitialPageImpl.
+ virtual bool IsHidden() = 0;
+ virtual void RenderViewForInterstitialPageCreated(
+ RenderViewHost* render_view_host) = 0;
+ virtual void AttachInterstitialPage(
+ InterstitialPageImpl* interstitial_page) = 0;
+ virtual void DetachInterstitialPage() = 0;
+ virtual void SetIsLoading(RenderViewHost* render_view_host,
+ bool is_loading,
+ LoadNotificationDetails* details) = 0;
+};
+
+} // namespace content
+
+#endif // CONTENT_BROWSER_FRAME_HOST_NAVIGATION_CONTROLLER_DELEGATE_H_