Chromium Code Reviews| 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_PUBLIC_BROWSER_NAVIGATION_ENTRY_H_ | 5 #ifndef CONTENT_PUBLIC_BROWSER_NAVIGATION_ENTRY_H_ |
| 6 #define CONTENT_PUBLIC_BROWSER_NAVIGATION_ENTRY_H_ | 6 #define CONTENT_PUBLIC_BROWSER_NAVIGATION_ENTRY_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <memory> | 10 #include <memory> |
| 11 #include <string> | 11 #include <string> |
| 12 | 12 |
| 13 #include "base/memory/ref_counted_memory.h" | 13 #include "base/memory/ref_counted_memory.h" |
| 14 #include "base/strings/string16.h" | 14 #include "base/strings/string16.h" |
| 15 #include "base/time/time.h" | 15 #include "base/time/time.h" |
| 16 #include "build/build_config.h" | 16 #include "build/build_config.h" |
| 17 #include "content/common/content_export.h" | 17 #include "content/common/content_export.h" |
| 18 #include "content/public/common/page_type.h" | 18 #include "content/public/common/page_type.h" |
| 19 #include "content/public/common/referrer.h" | 19 #include "content/public/common/referrer.h" |
| 20 #include "ui/base/page_transition_types.h" | 20 #include "ui/base/page_transition_types.h" |
| 21 | 21 |
| 22 class GURL; | 22 class GURL; |
| 23 | 23 |
| 24 namespace url { | |
| 25 class Origin; | |
| 26 } | |
| 27 | |
| 24 namespace content { | 28 namespace content { |
| 25 | 29 |
| 26 class PageState; | 30 class PageState; |
| 27 struct FaviconStatus; | 31 struct FaviconStatus; |
| 28 struct SSLStatus; | 32 struct SSLStatus; |
| 29 | 33 |
| 30 // A NavigationEntry is a data structure that captures all the information | 34 // A NavigationEntry is a data structure that captures all the information |
| 31 // required to recreate a browsing state. This includes some opaque binary | 35 // required to recreate a browsing state. This includes some opaque binary |
| 32 // state as provided by the WebContents as well as some clear text title and | 36 // state as provided by the WebContents as well as some clear text title and |
| 33 // URL which is used for our user interface. | 37 // URL which is used for our user interface. |
| (...skipping 13 matching lines...) Expand all Loading... | |
| 47 | 51 |
| 48 // The page type tells us if this entry is for an interstitial or error page. | 52 // The page type tells us if this entry is for an interstitial or error page. |
| 49 virtual content::PageType GetPageType() const = 0; | 53 virtual content::PageType GetPageType() const = 0; |
| 50 | 54 |
| 51 // The actual URL of the page. For some about pages, this may be a scary | 55 // The actual URL of the page. For some about pages, this may be a scary |
| 52 // data: URL or something like that. Use GetVirtualURL() below for showing to | 56 // data: URL or something like that. Use GetVirtualURL() below for showing to |
| 53 // the user. | 57 // the user. |
| 54 virtual void SetURL(const GURL& url) = 0; | 58 virtual void SetURL(const GURL& url) = 0; |
| 55 virtual const GURL& GetURL() const = 0; | 59 virtual const GURL& GetURL() const = 0; |
| 56 | 60 |
| 61 // The effective Origin at the time of commit. | |
|
Charlie Reis
2016/04/19 22:32:53
Same about mentioning that it's an empty unique or
| |
| 62 virtual void SetOrigin(const url::Origin& origin) = 0; | |
| 63 virtual const url::Origin& GetOrigin() const = 0; | |
| 64 | |
| 57 // Used for specifying a base URL for pages loaded via data URLs. | 65 // Used for specifying a base URL for pages loaded via data URLs. |
| 58 virtual void SetBaseURLForDataURL(const GURL& url) = 0; | 66 virtual void SetBaseURLForDataURL(const GURL& url) = 0; |
| 59 virtual const GURL& GetBaseURLForDataURL() const = 0; | 67 virtual const GURL& GetBaseURLForDataURL() const = 0; |
| 60 | 68 |
| 61 #if defined(OS_ANDROID) | 69 #if defined(OS_ANDROID) |
| 62 // The real data: URL when it is received via WebView.loadDataWithBaseUrl | 70 // The real data: URL when it is received via WebView.loadDataWithBaseUrl |
| 63 // method. Represented as a string to circumvent the size restriction | 71 // method. Represented as a string to circumvent the size restriction |
| 64 // of GURLs for compatibility with legacy Android WebView apps. | 72 // of GURLs for compatibility with legacy Android WebView apps. |
| 65 virtual void SetDataURLAsString( | 73 virtual void SetDataURLAsString( |
| 66 scoped_refptr<base::RefCountedString> data_url) = 0; | 74 scoped_refptr<base::RefCountedString> data_url) = 0; |
| (...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 219 virtual void SetRedirectChain(const std::vector<GURL>& redirects) = 0; | 227 virtual void SetRedirectChain(const std::vector<GURL>& redirects) = 0; |
| 220 virtual const std::vector<GURL>& GetRedirectChain() const = 0; | 228 virtual const std::vector<GURL>& GetRedirectChain() const = 0; |
| 221 | 229 |
| 222 // True if this entry is restored and hasn't been loaded. | 230 // True if this entry is restored and hasn't been loaded. |
| 223 virtual bool IsRestored() const = 0; | 231 virtual bool IsRestored() const = 0; |
| 224 }; | 232 }; |
| 225 | 233 |
| 226 } // namespace content | 234 } // namespace content |
| 227 | 235 |
| 228 #endif // CONTENT_PUBLIC_BROWSER_NAVIGATION_ENTRY_H_ | 236 #endif // CONTENT_PUBLIC_BROWSER_NAVIGATION_ENTRY_H_ |
| OLD | NEW |