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

Unified Diff: content/public/browser/url_data_source.h

Issue 11896113: Add chrome-search: access from Instant overlay (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Yet another rebase Created 7 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/public/browser/content_browser_client.cc ('k') | content/public/browser/url_data_source.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 7d8847cf0e3ff9853bbd999934e6c9a768b17e98..49daf872e9f5dda466c3831664e0af04be8a2cf9 100644
--- a/content/public/browser/url_data_source.h
+++ b/content/public/browser/url_data_source.h
@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef CONTENT_PUBLIC_BROWSER_URL_DATA_SOURCE_DELEGATE_H_
-#define CONTENT_PUBLIC_BROWSER_URL_DATA_SOURCE_DELEGATE_H_
+#ifndef CONTENT_PUBLIC_BROWSER_URL_DATA_SOURCE_H_
+#define CONTENT_PUBLIC_BROWSER_URL_DATA_SOURCE_H_
#include <string>
@@ -16,10 +16,14 @@ namespace base {
class RefCountedMemory;
}
+namespace net {
+class URLRequest;
+}
+
namespace content {
class BrowserContext;
-// A URLDataSource is an object that can answer requests for data
+// A URLDataSource is an object that can answer requests for WebUI data
// asynchronously. An implementation of URLDataSource should handle calls to
// StartDataRequest() by starting its (implementation-specific) asynchronous
// request for the data, then running the callback given in that method to
@@ -95,8 +99,15 @@ class CONTENT_EXPORT URLDataSource {
// By default, the "X-Frame-Options: DENY" header is sent. To stop this from
// happening, return false. It is OK to return false as needed.
virtual bool ShouldDenyXFrameOptions() const;
+
+ // By default, only chrome: and chrome-devtools: requests are allowed.
+ // Override in specific WebUI data sources to enable for additional schemes or
+ // to implement fancier access control. Typically used in concert with
+ // ContentBrowserClient::GetAdditionalWebUISchemes() to permit additional
+ // WebUI scheme support for an embedder.
+ virtual bool ShouldServiceRequest(const net::URLRequest* request) const;
};
} // namespace content
-#endif // CONTENT_PUBLIC_BROWSER_URL_DATA_SOURCE_DELEGATE_H_
+#endif // CONTENT_PUBLIC_BROWSER_URL_DATA_SOURCE_H_
« no previous file with comments | « content/public/browser/content_browser_client.cc ('k') | content/public/browser/url_data_source.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698