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

Side by Side Diff: third_party/WebKit/Source/core/loader/FrameFetchContext.h

Issue 2860093003: Implement device-ram client hints header (Closed)
Patch Set: Rebase UseCounter.h Created 3 years, 6 months 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 /* 1 /*
2 * Copyright (C) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 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 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
141 const ResourceLoaderOptions&, 141 const ResourceLoaderOptions&,
142 SecurityViolationReportingPolicy, 142 SecurityViolationReportingPolicy,
143 ResourceRequest&) override; 143 ResourceRequest&) override;
144 void SetFirstPartyCookieAndRequestorOrigin(ResourceRequest&) override; 144 void SetFirstPartyCookieAndRequestorOrigin(ResourceRequest&) override;
145 145
146 // Exposed for testing. 146 // Exposed for testing.
147 void ModifyRequestForCSP(ResourceRequest&); 147 void ModifyRequestForCSP(ResourceRequest&);
148 void AddClientHintsIfNecessary(const ClientHintsPreferences&, 148 void AddClientHintsIfNecessary(const ClientHintsPreferences&,
149 const FetchParameters::ResourceWidth&, 149 const FetchParameters::ResourceWidth&,
150 ResourceRequest&); 150 ResourceRequest&);
151 static float ClientHintsDeviceRAM(int64_t physical_memory_mb);
151 152
152 MHTMLArchive* Archive() const override; 153 MHTMLArchive* Archive() const override;
153 154
154 std::unique_ptr<WebURLLoader> CreateURLLoader( 155 std::unique_ptr<WebURLLoader> CreateURLLoader(
155 const ResourceRequest&) override; 156 const ResourceRequest&) override;
156 157
157 DECLARE_VIRTUAL_TRACE(); 158 DECLARE_VIRTUAL_TRACE();
158 159
159 private: 160 private:
160 FrameFetchContext(DocumentLoader*, Document*); 161 FrameFetchContext(DocumentLoader*, Document*);
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
198 Member<DocumentLoader> document_loader_; 199 Member<DocumentLoader> document_loader_;
199 // FIXME: Oilpan: Ideally this should just be a traced Member but that will 200 // FIXME: Oilpan: Ideally this should just be a traced Member but that will
200 // currently leak because ComputedStyle and its data are not on the heap. 201 // currently leak because ComputedStyle and its data are not on the heap.
201 // See crbug.com/383860 for details. 202 // See crbug.com/383860 for details.
202 WeakMember<Document> document_; 203 WeakMember<Document> document_;
203 }; 204 };
204 205
205 } // namespace blink 206 } // namespace blink
206 207
207 #endif 208 #endif
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/frame/UseCounter.h ('k') | third_party/WebKit/Source/core/loader/FrameFetchContext.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698