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

Side by Side Diff: third_party/WebKit/public/web/WebDataSource.h

Issue 2416523002: Expose the initiating origin/URL of a navigation in the Blink public API (Closed)
Patch Set: rebase Created 4 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
« no previous file with comments | « third_party/WebKit/Source/web/tests/WebFrameTest.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2009 Google Inc. All rights reserved. 2 * Copyright (C) 2009 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 15 matching lines...) Expand all
26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 */ 29 */
30 30
31 #ifndef WebDataSource_h 31 #ifndef WebDataSource_h
32 #define WebDataSource_h 32 #define WebDataSource_h
33 33
34 #include "../platform/WebCommon.h" 34 #include "../platform/WebCommon.h"
35 #include "WebNavigationType.h" 35 #include "WebNavigationType.h"
36 #include "WebTextDirection.h"
37 36
38 namespace blink { 37 namespace blink {
39 38
40 class WebDocumentSubresourceFilter; 39 class WebDocumentSubresourceFilter;
41 class WebURL; 40 class WebURL;
42 class WebURLRequest; 41 class WebURLRequest;
43 class WebURLResponse; 42 class WebURLResponse;
44 template <typename T> 43 template <typename T>
45 class WebVector; 44 class WebVector;
46 45
47 class WebDataSource { 46 class WebDataSource {
48 public: 47 public:
49 class ExtraData { 48 class ExtraData {
50 public: 49 public:
51 virtual ~ExtraData() {} 50 virtual ~ExtraData() {}
52 }; 51 };
53 52
53 // Returns the URL of the document that triggered the creation of this
54 // datasource. Will return an empty URL once this datasource commits.
55 virtual WebURL requestorURL() const = 0;
56
54 // Returns the original request that resulted in this datasource. 57 // Returns the original request that resulted in this datasource.
55 virtual const WebURLRequest& originalRequest() const = 0; 58 virtual const WebURLRequest& originalRequest() const = 0;
56 59
57 // Returns the request corresponding to this datasource. It may 60 // Returns the request corresponding to this datasource. It may
58 // include additional request headers added by WebKit that were not 61 // include additional request headers added by WebKit that were not
59 // present in the original request. This request may also correspond 62 // present in the original request. This request may also correspond
60 // to a location specified by a redirect that was followed. 63 // to a location specified by a redirect that was followed.
61 virtual const WebURLRequest& request() const = 0; 64 virtual const WebURLRequest& request() const = 0;
62 65
63 // Returns the response associated with this datasource. 66 // Returns the response associated with this datasource.
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
120 // datasource is destroyed or when a new filter is set. 123 // datasource is destroyed or when a new filter is set.
121 virtual void setSubresourceFilter(WebDocumentSubresourceFilter*) = 0; 124 virtual void setSubresourceFilter(WebDocumentSubresourceFilter*) = 0;
122 125
123 protected: 126 protected:
124 ~WebDataSource() {} 127 ~WebDataSource() {}
125 }; 128 };
126 129
127 } // namespace blink 130 } // namespace blink
128 131
129 #endif 132 #endif
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/web/tests/WebFrameTest.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698