OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_BROWSER_WEBUI_WEB_UI_DATA_SOURCE_IMPL_H_ | 5 #ifndef CONTENT_BROWSER_WEBUI_WEB_UI_DATA_SOURCE_IMPL_H_ |
6 #define CONTENT_BROWSER_WEBUI_WEB_UI_DATA_SOURCE_IMPL_H_ | 6 #define CONTENT_BROWSER_WEBUI_WEB_UI_DATA_SOURCE_IMPL_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <map> | 10 #include <map> |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
43 void SetDefaultResource(int resource_id) override; | 43 void SetDefaultResource(int resource_id) override; |
44 void SetRequestFilter( | 44 void SetRequestFilter( |
45 const WebUIDataSource::HandleRequestCallback& callback) override; | 45 const WebUIDataSource::HandleRequestCallback& callback) override; |
46 void DisableReplaceExistingSource() override; | 46 void DisableReplaceExistingSource() override; |
47 void DisableContentSecurityPolicy() override; | 47 void DisableContentSecurityPolicy() override; |
48 void OverrideContentSecurityPolicyScriptSrc(const std::string& data) override; | 48 void OverrideContentSecurityPolicyScriptSrc(const std::string& data) override; |
49 void OverrideContentSecurityPolicyObjectSrc(const std::string& data) override; | 49 void OverrideContentSecurityPolicyObjectSrc(const std::string& data) override; |
50 void OverrideContentSecurityPolicyChildSrc(const std::string& data) override; | 50 void OverrideContentSecurityPolicyChildSrc(const std::string& data) override; |
51 void DisableDenyXFrameOptions() override; | 51 void DisableDenyXFrameOptions() override; |
52 void DisableI18nAndUseGzipForAllPaths() override; | 52 void DisableI18nAndUseGzipForAllPaths() override; |
| 53 const ui::TemplateReplacements* GetReplacements() const override; |
53 | 54 |
54 // When DisableI18nAndUseGzipForAllPaths is enabled, exclude the given |path|. | 55 // When DisableI18nAndUseGzipForAllPaths is enabled, exclude the given |path|. |
55 void ExcludePathFromGzip(const std::string& path); | 56 void ExcludePathFromGzip(const std::string& path); |
56 | 57 |
57 protected: | 58 protected: |
58 ~WebUIDataSourceImpl() override; | 59 ~WebUIDataSourceImpl() override; |
59 | 60 |
60 // Completes a request by sending our dictionary of localized strings. | 61 // Completes a request by sending our dictionary of localized strings. |
61 void SendLocalizedStringsAsJSON( | 62 void SendLocalizedStringsAsJSON( |
62 const URLDataSource::GotDataCallback& callback); | 63 const URLDataSource::GotDataCallback& callback); |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
108 bool add_load_time_data_defaults_; | 109 bool add_load_time_data_defaults_; |
109 bool replace_existing_source_; | 110 bool replace_existing_source_; |
110 bool use_gzip_for_all_paths_; | 111 bool use_gzip_for_all_paths_; |
111 | 112 |
112 DISALLOW_COPY_AND_ASSIGN(WebUIDataSourceImpl); | 113 DISALLOW_COPY_AND_ASSIGN(WebUIDataSourceImpl); |
113 }; | 114 }; |
114 | 115 |
115 } // namespace content | 116 } // namespace content |
116 | 117 |
117 #endif // CONTENT_BROWSER_WEBUI_WEB_UI_DATA_SOURCE_IMPL_H_ | 118 #endif // CONTENT_BROWSER_WEBUI_WEB_UI_DATA_SOURCE_IMPL_H_ |
OLD | NEW |