| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CONTENT_BROWSER_WEB_CONTENTS_NAVIGATION_CONTROLLER_IMPL_H_ | 5 #ifndef CONTENT_BROWSER_WEB_CONTENTS_NAVIGATION_CONTROLLER_IMPL_H_ |
| 6 #define CONTENT_BROWSER_WEB_CONTENTS_NAVIGATION_CONTROLLER_IMPL_H_ | 6 #define CONTENT_BROWSER_WEB_CONTENTS_NAVIGATION_CONTROLLER_IMPL_H_ |
| 7 | 7 |
| 8 #include "build/build_config.h" | 8 #include "build/build_config.h" |
| 9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
| 10 #include "base/memory/linked_ptr.h" | 10 #include "base/memory/linked_ptr.h" |
| 11 #include "base/time.h" | 11 #include "base/time.h" |
| 12 #include "content/browser/ssl/ssl_manager.h" | 12 #include "content/browser/ssl/ssl_manager.h" |
| 13 #include "content/public/browser/android/navigation_controller_webview.h" | |
| 14 #include "content/public/browser/navigation_controller.h" | 13 #include "content/public/browser/navigation_controller.h" |
| 15 #include "content/public/browser/navigation_type.h" | 14 #include "content/public/browser/navigation_type.h" |
| 16 | 15 |
| 17 struct ViewHostMsg_FrameNavigate_Params; | 16 struct ViewHostMsg_FrameNavigate_Params; |
| 18 class WebContentsImpl; | 17 class WebContentsImpl; |
| 19 | 18 |
| 20 namespace content { | 19 namespace content { |
| 21 class NavigationEntryImpl; | 20 class NavigationEntryImpl; |
| 22 struct LoadCommittedDetails; | 21 struct LoadCommittedDetails; |
| 23 class SiteInstance; | 22 class SiteInstance; |
| 24 } | 23 } |
| 25 | 24 |
| 26 class CONTENT_EXPORT NavigationControllerImpl | 25 class CONTENT_EXPORT NavigationControllerImpl |
| 27 : public NON_EXPORTED_BASE(content::NavigationController), | 26 : public NON_EXPORTED_BASE(content::NavigationController) { |
| 28 public NON_EXPORTED_BASE(content::NavigationControllerWebView) { | |
| 29 public: | 27 public: |
| 30 NavigationControllerImpl( | 28 NavigationControllerImpl( |
| 31 WebContentsImpl* web_contents, | 29 WebContentsImpl* web_contents, |
| 32 content::BrowserContext* browser_context); | 30 content::BrowserContext* browser_context); |
| 33 virtual ~NavigationControllerImpl(); | 31 virtual ~NavigationControllerImpl(); |
| 34 | 32 |
| 35 // NavigationController implementation: | 33 // NavigationController implementation: |
| 36 virtual content::WebContents* GetWebContents() const OVERRIDE; | 34 virtual content::WebContents* GetWebContents() const OVERRIDE; |
| 37 virtual content::BrowserContext* GetBrowserContext() const OVERRIDE; | 35 virtual content::BrowserContext* GetBrowserContext() const OVERRIDE; |
| 38 virtual void SetBrowserContext( | 36 virtual void SetBrowserContext( |
| (...skipping 12 matching lines...) Expand all Loading... |
| 51 virtual content::NavigationEntry* GetEntryAtIndex(int index) const OVERRIDE; | 49 virtual content::NavigationEntry* GetEntryAtIndex(int index) const OVERRIDE; |
| 52 virtual content::NavigationEntry* GetEntryAtOffset(int offset) const OVERRIDE; | 50 virtual content::NavigationEntry* GetEntryAtOffset(int offset) const OVERRIDE; |
| 53 virtual void DiscardNonCommittedEntries() OVERRIDE; | 51 virtual void DiscardNonCommittedEntries() OVERRIDE; |
| 54 virtual content::NavigationEntry* GetPendingEntry() const OVERRIDE; | 52 virtual content::NavigationEntry* GetPendingEntry() const OVERRIDE; |
| 55 virtual int GetPendingEntryIndex() const OVERRIDE; | 53 virtual int GetPendingEntryIndex() const OVERRIDE; |
| 56 virtual content::NavigationEntry* GetTransientEntry() const OVERRIDE; | 54 virtual content::NavigationEntry* GetTransientEntry() const OVERRIDE; |
| 57 virtual void LoadURL(const GURL& url, | 55 virtual void LoadURL(const GURL& url, |
| 58 const content::Referrer& referrer, | 56 const content::Referrer& referrer, |
| 59 content::PageTransition type, | 57 content::PageTransition type, |
| 60 const std::string& extra_headers) OVERRIDE; | 58 const std::string& extra_headers) OVERRIDE; |
| 61 virtual void LoadURLFromRenderer(const GURL& url, | 59 virtual void LoadURLWithParams(const LoadURLParams& params) OVERRIDE; |
| 62 const content::Referrer& referrer, | |
| 63 content::PageTransition type, | |
| 64 const std::string& extra_headers) OVERRIDE; | |
| 65 virtual void LoadURLWithUserAgentOverride( | |
| 66 const GURL& url, | |
| 67 const content::Referrer& referrer, | |
| 68 content::PageTransition type, | |
| 69 bool is_renderer_initiated, | |
| 70 const std::string& extra_headers, | |
| 71 bool is_overriding_user_agent) OVERRIDE; | |
| 72 virtual void TransferURL( | |
| 73 const GURL& url, | |
| 74 const content::Referrer& referrer, | |
| 75 content::PageTransition transition, | |
| 76 const std::string& extra_headers, | |
| 77 const content::GlobalRequestID& transferred_global_request_id, | |
| 78 bool is_renderer_initiated) OVERRIDE; | |
| 79 virtual void LoadIfNecessary() OVERRIDE; | 60 virtual void LoadIfNecessary() OVERRIDE; |
| 80 virtual bool CanGoBack() const OVERRIDE; | 61 virtual bool CanGoBack() const OVERRIDE; |
| 81 virtual bool CanGoForward() const OVERRIDE; | 62 virtual bool CanGoForward() const OVERRIDE; |
| 82 virtual bool CanGoToOffset(int offset) const OVERRIDE; | 63 virtual bool CanGoToOffset(int offset) const OVERRIDE; |
| 83 virtual void GoBack() OVERRIDE; | 64 virtual void GoBack() OVERRIDE; |
| 84 virtual void GoForward() OVERRIDE; | 65 virtual void GoForward() OVERRIDE; |
| 85 virtual void GoToIndex(int index) OVERRIDE; | 66 virtual void GoToIndex(int index) OVERRIDE; |
| 86 virtual void GoToOffset(int offset) OVERRIDE; | 67 virtual void GoToOffset(int offset) OVERRIDE; |
| 87 virtual void RemoveEntryAtIndex(int index) OVERRIDE; | 68 virtual void RemoveEntryAtIndex(int index) OVERRIDE; |
| 88 virtual const content::SessionStorageNamespaceMap& | 69 virtual const content::SessionStorageNamespaceMap& |
| 89 GetSessionStorageNamespaceMap() const OVERRIDE; | 70 GetSessionStorageNamespaceMap() const OVERRIDE; |
| 90 virtual content::SessionStorageNamespace* | 71 virtual content::SessionStorageNamespace* |
| 91 GetDefaultSessionStorageNamespace() OVERRIDE; | 72 GetDefaultSessionStorageNamespace() OVERRIDE; |
| 92 virtual void SetMaxRestoredPageID(int32 max_id) OVERRIDE; | 73 virtual void SetMaxRestoredPageID(int32 max_id) OVERRIDE; |
| 93 virtual int32 GetMaxRestoredPageID() const OVERRIDE; | 74 virtual int32 GetMaxRestoredPageID() const OVERRIDE; |
| 94 virtual bool NeedsReload() const OVERRIDE; | 75 virtual bool NeedsReload() const OVERRIDE; |
| 95 virtual void CancelPendingReload() OVERRIDE; | 76 virtual void CancelPendingReload() OVERRIDE; |
| 96 virtual void ContinuePendingReload() OVERRIDE; | 77 virtual void ContinuePendingReload() OVERRIDE; |
| 97 virtual bool IsInitialNavigation() OVERRIDE; | 78 virtual bool IsInitialNavigation() OVERRIDE; |
| 98 virtual void Reload(bool check_for_repost) OVERRIDE; | 79 virtual void Reload(bool check_for_repost) OVERRIDE; |
| 99 virtual void ReloadIgnoringCache(bool check_for_repost) OVERRIDE; | 80 virtual void ReloadIgnoringCache(bool check_for_repost) OVERRIDE; |
| 100 virtual void NotifyEntryChanged(const content::NavigationEntry* entry, | 81 virtual void NotifyEntryChanged(const content::NavigationEntry* entry, |
| 101 int index) OVERRIDE; | 82 int index) OVERRIDE; |
| 102 virtual void CopyStateFrom( | 83 virtual void CopyStateFrom( |
| 103 const content::NavigationController& source) OVERRIDE; | 84 const content::NavigationController& source) OVERRIDE; |
| 104 virtual void CopyStateFromAndPrune( | 85 virtual void CopyStateFromAndPrune( |
| 105 content::NavigationController* source) OVERRIDE; | 86 content::NavigationController* source) OVERRIDE; |
| 106 virtual void PruneAllButActive() OVERRIDE; | 87 virtual void PruneAllButActive() OVERRIDE; |
| 107 | 88 |
| 108 // NavigationControllerWebView implementation. | |
| 109 virtual void LoadDataWithBaseURL( | |
| 110 const GURL& data_url, | |
| 111 const content::Referrer& referrer, | |
| 112 const GURL& base_url, | |
| 113 const GURL& history_url, | |
| 114 bool is_overriding_user_agent) OVERRIDE; | |
| 115 virtual void PostURL(const GURL& url, | |
| 116 const content::Referrer& referrer, | |
| 117 const base::RefCountedMemory& http_body, | |
| 118 bool is_overriding_user_agent) OVERRIDE; | |
| 119 | |
| 120 // The session storage namespace that all child RenderViews belonging to | 89 // The session storage namespace that all child RenderViews belonging to |
| 121 // |instance| should use. | 90 // |instance| should use. |
| 122 content::SessionStorageNamespace* GetSessionStorageNamespace( | 91 content::SessionStorageNamespace* GetSessionStorageNamespace( |
| 123 content::SiteInstance* instance); | 92 content::SiteInstance* instance); |
| 124 | 93 |
| 125 // Returns the index of the specified entry, or -1 if entry is not contained | 94 // Returns the index of the specified entry, or -1 if entry is not contained |
| 126 // in this NavigationController. | 95 // in this NavigationController. |
| 127 int GetIndexOfEntry(const content::NavigationEntryImpl* entry) const; | 96 int GetIndexOfEntry(const content::NavigationEntryImpl* entry) const; |
| 128 | 97 |
| 129 // Return the index of the entry with the corresponding instance and page_id, | 98 // Return the index of the entry with the corresponding instance and page_id, |
| (...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 374 static size_t max_entry_count_for_testing_; | 343 static size_t max_entry_count_for_testing_; |
| 375 | 344 |
| 376 // If a repost is pending, its type (RELOAD or RELOAD_IGNORING_CACHE), | 345 // If a repost is pending, its type (RELOAD or RELOAD_IGNORING_CACHE), |
| 377 // NO_RELOAD otherwise. | 346 // NO_RELOAD otherwise. |
| 378 ReloadType pending_reload_; | 347 ReloadType pending_reload_; |
| 379 | 348 |
| 380 DISALLOW_COPY_AND_ASSIGN(NavigationControllerImpl); | 349 DISALLOW_COPY_AND_ASSIGN(NavigationControllerImpl); |
| 381 }; | 350 }; |
| 382 | 351 |
| 383 #endif // CONTENT_BROWSER_WEB_CONTENTS_NAVIGATION_CONTROLLER_IMPL_H_ | 352 #endif // CONTENT_BROWSER_WEB_CONTENTS_NAVIGATION_CONTROLLER_IMPL_H_ |
| OLD | NEW |