| 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 <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/memory/ref_counted_memory.h" | 10 #include "base/memory/ref_counted_memory.h" |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 48 // The actual URL of the page. For some about pages, this may be a scary | 48 // The actual URL of the page. For some about pages, this may be a scary |
| 49 // data: URL or something like that. Use GetVirtualURL() below for showing to | 49 // data: URL or something like that. Use GetVirtualURL() below for showing to |
| 50 // the user. | 50 // the user. |
| 51 virtual void SetURL(const GURL& url) = 0; | 51 virtual void SetURL(const GURL& url) = 0; |
| 52 virtual const GURL& GetURL() const = 0; | 52 virtual const GURL& GetURL() const = 0; |
| 53 | 53 |
| 54 // Used for specifying a base URL for pages loaded via data URLs. | 54 // Used for specifying a base URL for pages loaded via data URLs. |
| 55 virtual void SetBaseURLForDataURL(const GURL& url) = 0; | 55 virtual void SetBaseURLForDataURL(const GURL& url) = 0; |
| 56 virtual const GURL& GetBaseURLForDataURL() const = 0; | 56 virtual const GURL& GetBaseURLForDataURL() const = 0; |
| 57 | 57 |
| 58 #if defined(OS_ANDROID) |
| 59 // The real data: URL when it is received via WebView.loadDataWithBaseUrl |
| 60 // method. Represented as a string to circumvent the size restriction |
| 61 // of GURLs for compatibility with legacy Android WebView apps. |
| 62 virtual void SetDataURLAsString( |
| 63 scoped_refptr<base::RefCountedString> data_url) = 0; |
| 64 virtual const scoped_refptr<const base::RefCountedString> GetDataURLAsString() |
| 65 const = 0; |
| 66 #endif |
| 67 |
| 58 // The referring URL. Can be empty. | 68 // The referring URL. Can be empty. |
| 59 virtual void SetReferrer(const content::Referrer& referrer) = 0; | 69 virtual void SetReferrer(const content::Referrer& referrer) = 0; |
| 60 virtual const content::Referrer& GetReferrer() const = 0; | 70 virtual const content::Referrer& GetReferrer() const = 0; |
| 61 | 71 |
| 62 // The virtual URL, when nonempty, will override the actual URL of the page | 72 // The virtual URL, when nonempty, will override the actual URL of the page |
| 63 // when we display it to the user. This allows us to have nice and friendly | 73 // when we display it to the user. This allows us to have nice and friendly |
| 64 // URLs that the user sees for things like about: URLs, but actually feed | 74 // URLs that the user sees for things like about: URLs, but actually feed |
| 65 // the renderer a data URL that results in the content loading. | 75 // the renderer a data URL that results in the content loading. |
| 66 // | 76 // |
| 67 // GetVirtualURL() will return the URL to display to the user in all cases, so | 77 // GetVirtualURL() will return the URL to display to the user in all cases, so |
| (...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 209 virtual void SetRedirectChain(const std::vector<GURL>& redirects) = 0; | 219 virtual void SetRedirectChain(const std::vector<GURL>& redirects) = 0; |
| 210 virtual const std::vector<GURL>& GetRedirectChain() const = 0; | 220 virtual const std::vector<GURL>& GetRedirectChain() const = 0; |
| 211 | 221 |
| 212 // True if this entry is restored and hasn't been loaded. | 222 // True if this entry is restored and hasn't been loaded. |
| 213 virtual bool IsRestored() const = 0; | 223 virtual bool IsRestored() const = 0; |
| 214 }; | 224 }; |
| 215 | 225 |
| 216 } // namespace content | 226 } // namespace content |
| 217 | 227 |
| 218 #endif // CONTENT_PUBLIC_BROWSER_NAVIGATION_ENTRY_H_ | 228 #endif // CONTENT_PUBLIC_BROWSER_NAVIGATION_ENTRY_H_ |
| OLD | NEW |