Index: content/public/browser/url_data_source.h |
diff --git a/content/public/browser/url_data_source.h b/content/public/browser/url_data_source.h |
index 33c185b63b87b5b8670f19f0590caad81eceefef..8650db3912d0a94407bd5b8248557b45fc9b9a09 100644 |
--- a/content/public/browser/url_data_source.h |
+++ b/content/public/browser/url_data_source.h |
@@ -119,6 +119,15 @@ class CONTENT_EXPORT URLDataSource { |
// is for chrome-devtools. |
virtual bool ShouldServeMimeTypeAsContentTypeHeader() const; |
+ // This method is called when the request contains "Origin:" header. The value |
+ // of the header is passed in |origin| parameter. If the returned value is not |
+ // empty, it is used as a value for "Access-Control-Allow-Origin:" response |
+ // header, otherwise the header is not set. This method should return either |
+ // |origin|, or "*", or "none", or empty string. |
+ // Default implementation returns an empty string. |
+ virtual std::string GetAccessControlAllowOriginHeaderForOrigin( |
+ const std::string& origin) const; |
+ |
// Called to inform the source that StartDataRequest() will be called soon. |
// Gives the source an opportunity to rewrite |path| to incorporate extra |
// information from the URLRequest prior to serving. |