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 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
181 void LoadURL(const GURL& url, | 181 void LoadURL(const GURL& url, |
182 const content::Referrer& referrer, | 182 const content::Referrer& referrer, |
183 content::PageTransition type, | 183 content::PageTransition type, |
184 const std::string& extra_headers); | 184 const std::string& extra_headers); |
185 | 185 |
186 // Same as LoadURL, but for renderer-initiated navigations. This state is | 186 // Same as LoadURL, but for renderer-initiated navigations. This state is |
187 // important for tracking whether to display pending URLs. | 187 // important for tracking whether to display pending URLs. |
188 void LoadURLFromRenderer(const GURL& url, | 188 void LoadURLFromRenderer(const GURL& url, |
189 const content::Referrer& referrer, | 189 const content::Referrer& referrer, |
190 content::PageTransition type, | 190 content::PageTransition type, |
191 const std::string& extra_headers); | 191 const std::string& extra_headers, |
| 192 int64 opener_browsing_instance_frame_id = -1); |
192 | 193 |
193 // Behaves like LoadURL() and LoadURLFromRenderer() but marks the new | 194 // Behaves like LoadURL() and LoadURLFromRenderer() but marks the new |
194 // navigation as being transferred from one RVH to another. In this case the | 195 // navigation as being transferred from one RVH to another. In this case the |
195 // browser can recycle the old request once the new renderer wants to | 196 // browser can recycle the old request once the new renderer wants to |
196 // navigate. | 197 // navigate. |
197 // |transferred_global_request_id| identifies the request ID of the old | 198 // |transferred_global_request_id| identifies the request ID of the old |
198 // request. | 199 // request. |
199 void TransferURL( | 200 void TransferURL( |
200 const GURL& url, | 201 const GURL& url, |
201 const content::Referrer& referrer, | 202 const content::Referrer& referrer, |
202 content::PageTransition transition, | 203 content::PageTransition transition, |
203 const std::string& extra_headers, | 204 const std::string& extra_headers, |
| 205 const int64 opener_browsing_instance_frame_id, |
204 const GlobalRequestID& transferred_global_request_id, | 206 const GlobalRequestID& transferred_global_request_id, |
205 bool is_renderer_initiated); | 207 bool is_renderer_initiated); |
206 | 208 |
207 // Loads the current page if this NavigationController was restored from | 209 // Loads the current page if this NavigationController was restored from |
208 // history and the current page has not loaded yet. | 210 // history and the current page has not loaded yet. |
209 void LoadIfNecessary(); | 211 void LoadIfNecessary(); |
210 | 212 |
211 // Renavigation -------------------------------------------------------------- | 213 // Renavigation -------------------------------------------------------------- |
212 | 214 |
213 // Navigation relative to the "current entry" | 215 // Navigation relative to the "current entry" |
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
350 | 352 |
351 // Creates navigation entry and translates the virtual url to a real one. | 353 // Creates navigation entry and translates the virtual url to a real one. |
352 // Used when navigating to a new URL using LoadURL. Extra headers are | 354 // Used when navigating to a new URL using LoadURL. Extra headers are |
353 // separated by \n. | 355 // separated by \n. |
354 static NavigationEntry* CreateNavigationEntry( | 356 static NavigationEntry* CreateNavigationEntry( |
355 const GURL& url, | 357 const GURL& url, |
356 const content::Referrer& referrer, | 358 const content::Referrer& referrer, |
357 content::PageTransition transition, | 359 content::PageTransition transition, |
358 bool is_renderer_initiated, | 360 bool is_renderer_initiated, |
359 const std::string& extra_headers, | 361 const std::string& extra_headers, |
360 content::BrowserContext* browser_context); | 362 content::BrowserContext* browser_context, |
| 363 int64 opener_browsing_instance_frame_id = -1); |
361 | 364 |
362 private: | 365 private: |
363 class RestoreHelper; | 366 class RestoreHelper; |
364 friend class RestoreHelper; | 367 friend class RestoreHelper; |
365 friend class TabContents; // For invoking OnReservedPageIDRange. | 368 friend class TabContents; // For invoking OnReservedPageIDRange. |
366 | 369 |
367 // Classifies the given renderer navigation (see the NavigationType enum). | 370 // Classifies the given renderer navigation (see the NavigationType enum). |
368 content::NavigationType ClassifyNavigation( | 371 content::NavigationType ClassifyNavigation( |
369 const ViewHostMsg_FrameNavigate_Params& params) const; | 372 const ViewHostMsg_FrameNavigate_Params& params) const; |
370 | 373 |
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
504 static size_t max_entry_count_; | 507 static size_t max_entry_count_; |
505 | 508 |
506 // If a repost is pending, its type (RELOAD or RELOAD_IGNORING_CACHE), | 509 // If a repost is pending, its type (RELOAD or RELOAD_IGNORING_CACHE), |
507 // NO_RELOAD otherwise. | 510 // NO_RELOAD otherwise. |
508 ReloadType pending_reload_; | 511 ReloadType pending_reload_; |
509 | 512 |
510 DISALLOW_COPY_AND_ASSIGN(NavigationController); | 513 DISALLOW_COPY_AND_ASSIGN(NavigationController); |
511 }; | 514 }; |
512 | 515 |
513 #endif // CONTENT_BROWSER_TAB_CONTENTS_NAVIGATION_CONTROLLER_H_ | 516 #endif // CONTENT_BROWSER_TAB_CONTENTS_NAVIGATION_CONTROLLER_H_ |
OLD | NEW |