Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_FRAME_HOST_NAVIGATION_ENTRY_IMPL_H_ | 5 #ifndef CONTENT_BROWSER_FRAME_HOST_NAVIGATION_ENTRY_IMPL_H_ |
| 6 #define CONTENT_BROWSER_FRAME_HOST_NAVIGATION_ENTRY_IMPL_H_ | 6 #define CONTENT_BROWSER_FRAME_HOST_NAVIGATION_ENTRY_IMPL_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| 11 #include "base/memory/ref_counted.h" | 11 #include "base/memory/ref_counted.h" |
| 12 #include "base/memory/scoped_vector.h" | 12 #include "base/memory/scoped_vector.h" |
| 13 #include "base/time/time.h" | 13 #include "base/time/time.h" |
| 14 #include "build/build_config.h" | 14 #include "build/build_config.h" |
| 15 #include "content/browser/frame_host/frame_navigation_entry.h" | 15 #include "content/browser/frame_host/frame_navigation_entry.h" |
| 16 #include "content/browser/frame_host/frame_tree_node.h" | 16 #include "content/browser/frame_host/frame_tree_node.h" |
| 17 #include "content/browser/site_instance_impl.h" | 17 #include "content/browser/site_instance_impl.h" |
| 18 #include "content/common/frame_message_enums.h" | 18 #include "content/common/frame_message_enums.h" |
| 19 #include "content/public/browser/favicon_status.h" | 19 #include "content/public/browser/favicon_status.h" |
| 20 #include "content/public/browser/global_request_id.h" | 20 #include "content/public/browser/global_request_id.h" |
| 21 #include "content/public/browser/navigation_entry.h" | 21 #include "content/public/browser/navigation_entry.h" |
| 22 #include "content/public/common/page_state.h" | 22 #include "content/public/common/page_state.h" |
| 23 #include "content/public/common/ssl_status.h" | 23 #include "content/public/common/ssl_status.h" |
| 24 #include "url/origin.h" | |
| 24 | 25 |
| 25 namespace content { | 26 namespace content { |
| 26 struct CommonNavigationParams; | 27 struct CommonNavigationParams; |
| 27 struct RequestNavigationParams; | 28 struct RequestNavigationParams; |
| 28 struct StartNavigationParams; | 29 struct StartNavigationParams; |
| 29 | 30 |
| 30 class CONTENT_EXPORT NavigationEntryImpl | 31 class CONTENT_EXPORT NavigationEntryImpl |
| 31 : public NON_EXPORTED_BASE(NavigationEntry) { | 32 : public NON_EXPORTED_BASE(NavigationEntry) { |
| 32 public: | 33 public: |
| 33 // Represents a tree of FrameNavigationEntries that make up this joint session | 34 // Represents a tree of FrameNavigationEntries that make up this joint session |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 76 const base::string16& title, | 77 const base::string16& title, |
| 77 ui::PageTransition transition_type, | 78 ui::PageTransition transition_type, |
| 78 bool is_renderer_initiated); | 79 bool is_renderer_initiated); |
| 79 ~NavigationEntryImpl() override; | 80 ~NavigationEntryImpl() override; |
| 80 | 81 |
| 81 // NavigationEntry implementation: | 82 // NavigationEntry implementation: |
| 82 int GetUniqueID() const override; | 83 int GetUniqueID() const override; |
| 83 PageType GetPageType() const override; | 84 PageType GetPageType() const override; |
| 84 void SetURL(const GURL& url) override; | 85 void SetURL(const GURL& url) override; |
| 85 const GURL& GetURL() const override; | 86 const GURL& GetURL() const override; |
| 87 void SetOrigin(const url::Origin& origin) override; | |
| 88 const url::Origin& GetOrigin() const override; | |
| 86 void SetBaseURLForDataURL(const GURL& url) override; | 89 void SetBaseURLForDataURL(const GURL& url) override; |
| 87 const GURL& GetBaseURLForDataURL() const override; | 90 const GURL& GetBaseURLForDataURL() const override; |
| 88 #if defined(OS_ANDROID) | 91 #if defined(OS_ANDROID) |
| 89 void SetDataURLAsString( | 92 void SetDataURLAsString( |
| 90 scoped_refptr<base::RefCountedString> data_url) override; | 93 scoped_refptr<base::RefCountedString> data_url) override; |
| 91 const scoped_refptr<const base::RefCountedString> GetDataURLAsString() | 94 const scoped_refptr<const base::RefCountedString> GetDataURLAsString() |
| 92 const override; | 95 const override; |
| 93 #endif | 96 #endif |
| 94 void SetReferrer(const Referrer& referrer) override; | 97 void SetReferrer(const Referrer& referrer) override; |
| 95 const Referrer& GetReferrer() const override; | 98 const Referrer& GetReferrer() const override; |
| (...skipping 299 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 395 int32_t page_id_; | 398 int32_t page_id_; |
| 396 SSLStatus ssl_; | 399 SSLStatus ssl_; |
| 397 ui::PageTransition transition_type_; | 400 ui::PageTransition transition_type_; |
| 398 GURL user_typed_url_; | 401 GURL user_typed_url_; |
| 399 RestoreType restore_type_; | 402 RestoreType restore_type_; |
| 400 GURL original_request_url_; | 403 GURL original_request_url_; |
| 401 bool is_overriding_user_agent_; | 404 bool is_overriding_user_agent_; |
| 402 base::Time timestamp_; | 405 base::Time timestamp_; |
| 403 int http_status_code_; | 406 int http_status_code_; |
| 404 | 407 |
| 408 // The effective Origin at the time of commit. | |
|
Charlie Reis
2016/04/19 22:32:52
Let's add that it starts as an empty, unique origi
| |
| 409 // | |
| 410 // This member is not persisted with session restore because it is transient. | |
|
Charlie Reis
2016/04/19 22:32:52
nit: Drop "because it is transient." Also, no new
| |
| 411 // | |
| 412 // TODO(creis): Move this to FrameNavigationEntry to make it useful for | |
| 413 // subframes as well. | |
| 414 url::Origin origin_; | |
| 415 | |
| 405 // This member is not persisted with session restore because it is transient. | 416 // This member is not persisted with session restore because it is transient. |
| 406 // If the post request succeeds, this field is cleared since the same | 417 // If the post request succeeds, this field is cleared since the same |
| 407 // information is stored in |content_state_| above. It is also only shallow | 418 // information is stored in |content_state_| above. It is also only shallow |
| 408 // copied with compiler provided copy constructor. | 419 // copied with compiler provided copy constructor. |
| 409 // Cleared in |ResetForCommit|. | 420 // Cleared in |ResetForCommit|. |
| 410 scoped_refptr<const base::RefCountedMemory> browser_initiated_post_data_; | 421 scoped_refptr<const base::RefCountedMemory> browser_initiated_post_data_; |
| 411 | 422 |
| 412 // This is also a transient member (i.e. is not persisted with session | 423 // This is also a transient member (i.e. is not persisted with session |
| 413 // restore). The screenshot of a page is taken when navigating away from the | 424 // restore). The screenshot of a page is taken when navigating away from the |
| 414 // page. This screenshot is displayed during an overscroll-navigation | 425 // page. This screenshot is displayed during an overscroll-navigation |
| (...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 502 // persisted, unless specific data is taken out/put back in at save/restore | 513 // persisted, unless specific data is taken out/put back in at save/restore |
| 503 // time (see TabNavigation for an example of this). | 514 // time (see TabNavigation for an example of this). |
| 504 std::map<std::string, base::string16> extra_data_; | 515 std::map<std::string, base::string16> extra_data_; |
| 505 | 516 |
| 506 DISALLOW_COPY_AND_ASSIGN(NavigationEntryImpl); | 517 DISALLOW_COPY_AND_ASSIGN(NavigationEntryImpl); |
| 507 }; | 518 }; |
| 508 | 519 |
| 509 } // namespace content | 520 } // namespace content |
| 510 | 521 |
| 511 #endif // CONTENT_BROWSER_FRAME_HOST_NAVIGATION_ENTRY_IMPL_H_ | 522 #endif // CONTENT_BROWSER_FRAME_HOST_NAVIGATION_ENTRY_IMPL_H_ |
| OLD | NEW |