OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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_URL_DATA_SOURCE_H_ | 5 #ifndef CONTENT_PUBLIC_BROWSER_URL_DATA_SOURCE_H_ |
6 #define CONTENT_PUBLIC_BROWSER_URL_DATA_SOURCE_H_ | 6 #define CONTENT_PUBLIC_BROWSER_URL_DATA_SOURCE_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/callback.h" | 10 #include "base/callback.h" |
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
100 // By default, the "X-Frame-Options: DENY" header is sent. To stop this from | 100 // By default, the "X-Frame-Options: DENY" header is sent. To stop this from |
101 // happening, return false. It is OK to return false as needed. | 101 // happening, return false. It is OK to return false as needed. |
102 virtual bool ShouldDenyXFrameOptions() const; | 102 virtual bool ShouldDenyXFrameOptions() const; |
103 | 103 |
104 // By default, only chrome: and chrome-devtools: requests are allowed. | 104 // By default, only chrome: and chrome-devtools: requests are allowed. |
105 // Override in specific WebUI data sources to enable for additional schemes or | 105 // Override in specific WebUI data sources to enable for additional schemes or |
106 // to implement fancier access control. Typically used in concert with | 106 // to implement fancier access control. Typically used in concert with |
107 // ContentBrowserClient::GetAdditionalWebUISchemes() to permit additional | 107 // ContentBrowserClient::GetAdditionalWebUISchemes() to permit additional |
108 // WebUI scheme support for an embedder. | 108 // WebUI scheme support for an embedder. |
109 virtual bool ShouldServiceRequest(const net::URLRequest* request) const; | 109 virtual bool ShouldServiceRequest(const net::URLRequest* request) const; |
| 110 |
| 111 // Called to inform the source that StartDataRequest() will be called soon. |
| 112 // Gives the source an opportunity to rewrite |path| to incorporate extra |
| 113 // information from the URLRequest prior to serving. |
| 114 virtual void WillServiceRequest( |
| 115 const net::URLRequest* request, |
| 116 std::string* path) const {} |
110 }; | 117 }; |
111 | 118 |
112 } // namespace content | 119 } // namespace content |
113 | 120 |
114 #endif // CONTENT_PUBLIC_BROWSER_URL_DATA_SOURCE_H_ | 121 #endif // CONTENT_PUBLIC_BROWSER_URL_DATA_SOURCE_H_ |
OLD | NEW |