Chromium Code Reviews| 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_WEB_UI_DATA_SOURCE_H_ | 5 #ifndef CONTENT_PUBLIC_BROWSER_WEB_UI_DATA_SOURCE_H_ |
| 6 #define CONTENT_PUBLIC_BROWSER_WEB_UI_DATA_SOURCE_H_ | 6 #define CONTENT_PUBLIC_BROWSER_WEB_UI_DATA_SOURCE_H_ |
| 7 | 7 |
| 8 #include "base/callback.h" | 8 #include "base/callback.h" |
| 9 #include "base/strings/string16.h" | 9 #include "base/strings/string16.h" |
| 10 #include "content/common/content_export.h" | 10 #include "content/common/content_export.h" |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 71 typedef base::Callback<bool(const std::string&, const GotDataCallback&)> | 71 typedef base::Callback<bool(const std::string&, const GotDataCallback&)> |
| 72 HandleRequestCallback; | 72 HandleRequestCallback; |
| 73 | 73 |
| 74 // Allows a caller to add a filter for URL requests. | 74 // Allows a caller to add a filter for URL requests. |
| 75 virtual void SetRequestFilter(const HandleRequestCallback& callback) = 0; | 75 virtual void SetRequestFilter(const HandleRequestCallback& callback) = 0; |
| 76 | 76 |
| 77 // The following map to methods on URLDataSource. See the documentation there. | 77 // The following map to methods on URLDataSource. See the documentation there. |
| 78 // NOTE: it's not acceptable to call DisableContentSecurityPolicy for new | 78 // NOTE: it's not acceptable to call DisableContentSecurityPolicy for new |
| 79 // pages, see URLDataSource::ShouldAddContentSecurityPolicy and talk to | 79 // pages, see URLDataSource::ShouldAddContentSecurityPolicy and talk to |
| 80 // tsepez. | 80 // tsepez. |
| 81 | |
| 82 // Currently only used by embedders for WebUIs with multiple instances, could | |
| 83 // have been useful for NTP as well if it wasn't implementing URLDataSource | |
|
jam
2013/08/25 07:22:39
nit: please remove everything after the comment. p
| |
| 84 // itself. | |
| 85 virtual void DisableReplaceExistingSource() = 0; | |
| 81 virtual void DisableContentSecurityPolicy() = 0; | 86 virtual void DisableContentSecurityPolicy() = 0; |
| 82 virtual void OverrideContentSecurityPolicyObjectSrc( | 87 virtual void OverrideContentSecurityPolicyObjectSrc( |
| 83 const std::string& data) = 0; | 88 const std::string& data) = 0; |
| 84 virtual void OverrideContentSecurityPolicyFrameSrc( | 89 virtual void OverrideContentSecurityPolicyFrameSrc( |
| 85 const std::string& data) = 0; | 90 const std::string& data) = 0; |
| 86 virtual void DisableDenyXFrameOptions() = 0; | 91 virtual void DisableDenyXFrameOptions() = 0; |
| 87 }; | 92 }; |
| 88 | 93 |
| 89 } // namespace content | 94 } // namespace content |
| 90 | 95 |
| 91 #endif // CONTENT_PUBLIC_BROWSER_WEB_UI_DATA_SOURCE_H_ | 96 #endif // CONTENT_PUBLIC_BROWSER_WEB_UI_DATA_SOURCE_H_ |
| OLD | NEW |