OLD | NEW |
---|---|
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_TAB_CONTENTS_NAVIGATION_CONTROLLER_H_ | 5 #ifndef CONTENT_BROWSER_TAB_CONTENTS_NAVIGATION_CONTROLLER_H_ |
6 #define CONTENT_BROWSER_TAB_CONTENTS_NAVIGATION_CONTROLLER_H_ | 6 #define CONTENT_BROWSER_TAB_CONTENTS_NAVIGATION_CONTROLLER_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include "build/build_config.h" | 9 #include "build/build_config.h" |
10 | 10 |
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
171 // by the navigation controller and may be deleted at any time. | 171 // by the navigation controller and may be deleted at any time. |
172 NavigationEntry* GetTransientEntry() const; | 172 NavigationEntry* GetTransientEntry() const; |
173 | 173 |
174 // New navigations ----------------------------------------------------------- | 174 // New navigations ----------------------------------------------------------- |
175 | 175 |
176 // Loads the specified URL, specifying extra http headers to add to the | 176 // Loads the specified URL, specifying extra http headers to add to the |
177 // request. Extra headers are separated by \n. | 177 // request. Extra headers are separated by \n. |
178 void LoadURL(const GURL& url, | 178 void LoadURL(const GURL& url, |
179 const GURL& referrer, | 179 const GURL& referrer, |
180 content::PageTransition type, | 180 content::PageTransition type, |
181 const std::string& extra_headers); | 181 const std::string& extra_headers, |
182 // TODO(supersat): If this is a user-initiated load, | |
183 // will this ever be set? | |
Charlie Reis
2011/12/01 23:13:02
Reasonable question. If you hit shift or control
supersat
2011/12/09 23:08:20
Done.
| |
184 int64 opener_browsing_instance_frame_id = -1); | |
182 | 185 |
183 // Same as LoadURL, but for renderer-initiated navigations. This state is | 186 // Same as LoadURL, but for renderer-initiated navigations. This state is |
184 // important for tracking whether to display pending URLs. | 187 // important for tracking whether to display pending URLs. |
185 void LoadURLFromRenderer(const GURL& url, | 188 void LoadURLFromRenderer(const GURL& url, |
186 const GURL& referrer, | 189 const GURL& referrer, |
187 content::PageTransition type, | 190 content::PageTransition type, |
188 const std::string& extra_headers); | 191 const std::string& extra_headers, |
192 int64 opener_browsing_instance_frame_id = -1); | |
189 | 193 |
190 // Loads the current page if this NavigationController was restored from | 194 // Loads the current page if this NavigationController was restored from |
191 // history and the current page has not loaded yet. | 195 // history and the current page has not loaded yet. |
192 void LoadIfNecessary(); | 196 void LoadIfNecessary(); |
193 | 197 |
194 // Renavigation -------------------------------------------------------------- | 198 // Renavigation -------------------------------------------------------------- |
195 | 199 |
196 // Navigation relative to the "current entry" | 200 // Navigation relative to the "current entry" |
197 bool CanGoBack() const; | 201 bool CanGoBack() const; |
198 bool CanGoForward() const; | 202 bool CanGoForward() const; |
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
333 | 337 |
334 // Creates navigation entry and translates the virtual url to a real one. | 338 // Creates navigation entry and translates the virtual url to a real one. |
335 // Used when navigating to a new URL using LoadURL. Extra headers are | 339 // Used when navigating to a new URL using LoadURL. Extra headers are |
336 // separated by \n. | 340 // separated by \n. |
337 static NavigationEntry* CreateNavigationEntry( | 341 static NavigationEntry* CreateNavigationEntry( |
338 const GURL& url, | 342 const GURL& url, |
339 const GURL& referrer, | 343 const GURL& referrer, |
340 content::PageTransition transition, | 344 content::PageTransition transition, |
341 bool is_renderer_initiated, | 345 bool is_renderer_initiated, |
342 const std::string& extra_headers, | 346 const std::string& extra_headers, |
343 content::BrowserContext* browser_context); | 347 content::BrowserContext* browser_context, |
348 int64 opener_browsing_instance_frame_id = -1); | |
344 | 349 |
345 private: | 350 private: |
346 class RestoreHelper; | 351 class RestoreHelper; |
347 friend class RestoreHelper; | 352 friend class RestoreHelper; |
348 friend class TabContents; // For invoking OnReservedPageIDRange. | 353 friend class TabContents; // For invoking OnReservedPageIDRange. |
349 | 354 |
350 // Classifies the given renderer navigation (see the NavigationType enum). | 355 // Classifies the given renderer navigation (see the NavigationType enum). |
351 content::NavigationType ClassifyNavigation( | 356 content::NavigationType ClassifyNavigation( |
352 const ViewHostMsg_FrameNavigate_Params& params) const; | 357 const ViewHostMsg_FrameNavigate_Params& params) const; |
353 | 358 |
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
487 static size_t max_entry_count_; | 492 static size_t max_entry_count_; |
488 | 493 |
489 // If a repost is pending, its type (RELOAD or RELOAD_IGNORING_CACHE), | 494 // If a repost is pending, its type (RELOAD or RELOAD_IGNORING_CACHE), |
490 // NO_RELOAD otherwise. | 495 // NO_RELOAD otherwise. |
491 ReloadType pending_reload_; | 496 ReloadType pending_reload_; |
492 | 497 |
493 DISALLOW_COPY_AND_ASSIGN(NavigationController); | 498 DISALLOW_COPY_AND_ASSIGN(NavigationController); |
494 }; | 499 }; |
495 | 500 |
496 #endif // CONTENT_BROWSER_TAB_CONTENTS_NAVIGATION_CONTROLLER_H_ | 501 #endif // CONTENT_BROWSER_TAB_CONTENTS_NAVIGATION_CONTROLLER_H_ |
OLD | NEW |