| 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" |
| 13 #include "content/public/browser/navigation_controller.h" | 14 #include "content/public/browser/navigation_controller.h" |
| 14 #include "content/public/browser/navigation_type.h" | 15 #include "content/public/browser/navigation_type.h" |
| 15 | 16 |
| 16 class SessionStorageNamespaceImpl; | 17 class SessionStorageNamespaceImpl; |
| 17 struct ViewHostMsg_FrameNavigate_Params; | 18 struct ViewHostMsg_FrameNavigate_Params; |
| 18 class WebContentsImpl; | 19 class WebContentsImpl; |
| 19 | 20 |
| 20 namespace content { | 21 namespace content { |
| 21 class NavigationEntryImpl; | 22 class NavigationEntryImpl; |
| 22 struct LoadCommittedDetails; | 23 struct LoadCommittedDetails; |
| 23 class SiteInstance; | 24 class SiteInstance; |
| 24 } | 25 } |
| 25 | 26 |
| 26 class CONTENT_EXPORT NavigationControllerImpl | 27 class CONTENT_EXPORT NavigationControllerImpl |
| 27 : public NON_EXPORTED_BASE(content::NavigationController) { | 28 : public NON_EXPORTED_BASE(content::NavigationController), |
| 29 public NON_EXPORTED_BASE(content::NavigationControllerWebView) { |
| 28 public: | 30 public: |
| 29 NavigationControllerImpl( | 31 NavigationControllerImpl( |
| 30 WebContentsImpl* web_contents, | 32 WebContentsImpl* web_contents, |
| 31 content::BrowserContext* browser_context, | 33 content::BrowserContext* browser_context, |
| 32 SessionStorageNamespaceImpl* session_storage_namespace); | 34 SessionStorageNamespaceImpl* session_storage_namespace); |
| 33 virtual ~NavigationControllerImpl(); | 35 virtual ~NavigationControllerImpl(); |
| 34 | 36 |
| 35 // NavigationController implementation: | 37 // NavigationController implementation: |
| 36 virtual content::WebContents* GetWebContents() const OVERRIDE; | 38 virtual content::WebContents* GetWebContents() const OVERRIDE; |
| 37 virtual content::BrowserContext* GetBrowserContext() const OVERRIDE; | 39 virtual content::BrowserContext* GetBrowserContext() const OVERRIDE; |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 96 virtual void Reload(bool check_for_repost) OVERRIDE; | 98 virtual void Reload(bool check_for_repost) OVERRIDE; |
| 97 virtual void ReloadIgnoringCache(bool check_for_repost) OVERRIDE; | 99 virtual void ReloadIgnoringCache(bool check_for_repost) OVERRIDE; |
| 98 virtual void NotifyEntryChanged(const content::NavigationEntry* entry, | 100 virtual void NotifyEntryChanged(const content::NavigationEntry* entry, |
| 99 int index) OVERRIDE; | 101 int index) OVERRIDE; |
| 100 virtual void CopyStateFrom( | 102 virtual void CopyStateFrom( |
| 101 const content::NavigationController& source) OVERRIDE; | 103 const content::NavigationController& source) OVERRIDE; |
| 102 virtual void CopyStateFromAndPrune( | 104 virtual void CopyStateFromAndPrune( |
| 103 content::NavigationController* source) OVERRIDE; | 105 content::NavigationController* source) OVERRIDE; |
| 104 virtual void PruneAllButActive() OVERRIDE; | 106 virtual void PruneAllButActive() OVERRIDE; |
| 105 | 107 |
| 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 |
| 106 // Returns the index of the specified entry, or -1 if entry is not contained | 116 // Returns the index of the specified entry, or -1 if entry is not contained |
| 107 // in this NavigationController. | 117 // in this NavigationController. |
| 108 int GetIndexOfEntry(const content::NavigationEntryImpl* entry) const; | 118 int GetIndexOfEntry(const content::NavigationEntryImpl* entry) const; |
| 109 | 119 |
| 110 // Return the index of the entry with the corresponding instance and page_id, | 120 // Return the index of the entry with the corresponding instance and page_id, |
| 111 // or -1 if not found. | 121 // or -1 if not found. |
| 112 int GetEntryIndexWithPageID(content::SiteInstance* instance, | 122 int GetEntryIndexWithPageID(content::SiteInstance* instance, |
| 113 int32 page_id) const; | 123 int32 page_id) const; |
| 114 | 124 |
| 115 // Return the entry with the corresponding instance and page_id, or NULL if | 125 // Return the entry with the corresponding instance and page_id, or NULL if |
| (...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 332 static size_t max_entry_count_for_testing_; | 342 static size_t max_entry_count_for_testing_; |
| 333 | 343 |
| 334 // If a repost is pending, its type (RELOAD or RELOAD_IGNORING_CACHE), | 344 // If a repost is pending, its type (RELOAD or RELOAD_IGNORING_CACHE), |
| 335 // NO_RELOAD otherwise. | 345 // NO_RELOAD otherwise. |
| 336 ReloadType pending_reload_; | 346 ReloadType pending_reload_; |
| 337 | 347 |
| 338 DISALLOW_COPY_AND_ASSIGN(NavigationControllerImpl); | 348 DISALLOW_COPY_AND_ASSIGN(NavigationControllerImpl); |
| 339 }; | 349 }; |
| 340 | 350 |
| 341 #endif // CONTENT_BROWSER_WEB_CONTENTS_NAVIGATION_CONTROLLER_IMPL_H_ | 351 #endif // CONTENT_BROWSER_WEB_CONTENTS_NAVIGATION_CONTROLLER_IMPL_H_ |
| OLD | NEW |