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 <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(scoped_refptr<base::RefCountedString>) = 0; | |
|
Charlie Reis
2015/12/14 20:35:57
nit: Please name parameter data_url.
mnaganov (inactive)
2015/12/15 18:30:29
Done.
| |
| 63 virtual const scoped_refptr<const base::RefCountedString> GetDataURLAsString() | |
| 64 const = 0; | |
| 65 #endif | |
| 66 | |
| 58 // The referring URL. Can be empty. | 67 // The referring URL. Can be empty. |
| 59 virtual void SetReferrer(const content::Referrer& referrer) = 0; | 68 virtual void SetReferrer(const content::Referrer& referrer) = 0; |
| 60 virtual const content::Referrer& GetReferrer() const = 0; | 69 virtual const content::Referrer& GetReferrer() const = 0; |
| 61 | 70 |
| 62 // The virtual URL, when nonempty, will override the actual URL of the page | 71 // 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 | 72 // 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 | 73 // 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. | 74 // the renderer a data URL that results in the content loading. |
| 66 // | 75 // |
| 67 // GetVirtualURL() will return the URL to display to the user in all cases, so | 76 // 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; | 218 virtual void SetRedirectChain(const std::vector<GURL>& redirects) = 0; |
| 210 virtual const std::vector<GURL>& GetRedirectChain() const = 0; | 219 virtual const std::vector<GURL>& GetRedirectChain() const = 0; |
| 211 | 220 |
| 212 // True if this entry is restored and hasn't been loaded. | 221 // True if this entry is restored and hasn't been loaded. |
| 213 virtual bool IsRestored() const = 0; | 222 virtual bool IsRestored() const = 0; |
| 214 }; | 223 }; |
| 215 | 224 |
| 216 } // namespace content | 225 } // namespace content |
| 217 | 226 |
| 218 #endif // CONTENT_PUBLIC_BROWSER_NAVIGATION_ENTRY_H_ | 227 #endif // CONTENT_PUBLIC_BROWSER_NAVIGATION_ENTRY_H_ |
| OLD | NEW |