Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(77)

Side by Side Diff: content/public/browser/navigation_entry.h

Issue 1497743005: Allow huge data: URIs only via WebView.loadDataWithBaseUrl (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Sort out the tests Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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 // The real data: URL when it is received via WebView.loadDataWithBaseUrl
59 // method. Represented as a string to circumvent the size restriction
60 // of GURLs for compatibility with legacy WebView apps.
61 virtual void SetDataURLAsString(const std::string& url) = 0;
62 virtual const std::string& GetDataURLAsString() const = 0;
63
58 // The referring URL. Can be empty. 64 // The referring URL. Can be empty.
59 virtual void SetReferrer(const content::Referrer& referrer) = 0; 65 virtual void SetReferrer(const content::Referrer& referrer) = 0;
60 virtual const content::Referrer& GetReferrer() const = 0; 66 virtual const content::Referrer& GetReferrer() const = 0;
61 67
62 // The virtual URL, when nonempty, will override the actual URL of the page 68 // 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 69 // 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 70 // 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. 71 // the renderer a data URL that results in the content loading.
66 // 72 //
67 // GetVirtualURL() will return the URL to display to the user in all cases, so 73 // 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
209 virtual void SetRedirectChain(const std::vector<GURL>& redirects) = 0; 215 virtual void SetRedirectChain(const std::vector<GURL>& redirects) = 0;
210 virtual const std::vector<GURL>& GetRedirectChain() const = 0; 216 virtual const std::vector<GURL>& GetRedirectChain() const = 0;
211 217
212 // True if this entry is restored and hasn't been loaded. 218 // True if this entry is restored and hasn't been loaded.
213 virtual bool IsRestored() const = 0; 219 virtual bool IsRestored() const = 0;
214 }; 220 };
215 221
216 } // namespace content 222 } // namespace content
217 223
218 #endif // CONTENT_PUBLIC_BROWSER_NAVIGATION_ENTRY_H_ 224 #endif // CONTENT_PUBLIC_BROWSER_NAVIGATION_ENTRY_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698