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_ENTRY_H_ | 5 #ifndef CONTENT_BROWSER_TAB_CONTENTS_NAVIGATION_ENTRY_H_ |
6 #define CONTENT_BROWSER_TAB_CONTENTS_NAVIGATION_ENTRY_H_ | 6 #define CONTENT_BROWSER_TAB_CONTENTS_NAVIGATION_ENTRY_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 313 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
324 } | 324 } |
325 | 325 |
326 // Extra headers (separated by \n) to send during the request. | 326 // Extra headers (separated by \n) to send during the request. |
327 void set_extra_headers(const std::string& extra_headers) { | 327 void set_extra_headers(const std::string& extra_headers) { |
328 extra_headers_ = extra_headers; | 328 extra_headers_ = extra_headers; |
329 } | 329 } |
330 const std::string& extra_headers() const { | 330 const std::string& extra_headers() const { |
331 return extra_headers_; | 331 return extra_headers_; |
332 } | 332 } |
333 | 333 |
| 334 // Used to support swapouts of frames with non-null openers. |
| 335 void set_opener_content_frame_id(int64 id) { |
| 336 opener_content_frame_id_ = id; |
| 337 } |
| 338 |
| 339 int64 opener_content_frame_id() const { |
| 340 return opener_content_frame_id_; |
| 341 } |
| 342 |
334 // Page-related helpers ------------------------------------------------------ | 343 // Page-related helpers ------------------------------------------------------ |
335 | 344 |
336 // Returns the title to be displayed on the tab. This could be the title of | 345 // Returns the title to be displayed on the tab. This could be the title of |
337 // the page if it is available or the URL. |languages| is the list of | 346 // the page if it is available or the URL. |languages| is the list of |
338 // accpeted languages (e.g., prefs::kAcceptLanguages) or empty if proper | 347 // accpeted languages (e.g., prefs::kAcceptLanguages) or empty if proper |
339 // URL formatting isn't needed (e.g., unit tests). | 348 // URL formatting isn't needed (e.g., unit tests). |
340 const string16& GetTitleForDisplay(const std::string& languages) const; | 349 const string16& GetTitleForDisplay(const std::string& languages) const; |
341 | 350 |
342 // Returns true if the current tab is in view source mode. This will be false | 351 // Returns true if the current tab is in view source mode. This will be false |
343 // if there is no navigation. | 352 // if there is no navigation. |
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
464 | 473 |
465 // In case a navigation is transferred to a new RVH but the request has | 474 // In case a navigation is transferred to a new RVH but the request has |
466 // been generated in the renderer already, this identifies the old request so | 475 // been generated in the renderer already, this identifies the old request so |
467 // that it can be resumed. The old request is stored until the | 476 // that it can be resumed. The old request is stored until the |
468 // ResourceDispatcher receives the navigation from the renderer which | 477 // ResourceDispatcher receives the navigation from the renderer which |
469 // carries this |transferred_global_request_id_| annotation. Once the request | 478 // carries this |transferred_global_request_id_| annotation. Once the request |
470 // is transferred to the new process, this is cleared and the request | 479 // is transferred to the new process, this is cleared and the request |
471 // continues as normal. | 480 // continues as normal. |
472 GlobalRequestID transferred_global_request_id_; | 481 GlobalRequestID transferred_global_request_id_; |
473 | 482 |
| 483 // If we're navigating a frame that should have an opener (such as when we |
| 484 // open a cross-process pop-up window), we store the content frame id of the |
| 485 // expected opener here so that we can re-create it if needed. If the frame |
| 486 // does not have an opener, this is -1. This is not persisted because |
| 487 // scripting connections are not currently persisted. |
| 488 int64 opener_content_frame_id_; |
| 489 |
474 // Copy and assignment is explicitly allowed for this class. | 490 // Copy and assignment is explicitly allowed for this class. |
475 }; | 491 }; |
476 | 492 |
477 #endif // CONTENT_BROWSER_TAB_CONTENTS_NAVIGATION_ENTRY_H_ | 493 #endif // CONTENT_BROWSER_TAB_CONTENTS_NAVIGATION_ENTRY_H_ |
OLD | NEW |