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