rdevlin.cronin | be084d2 | 2017-03-20 21:22:20 | [diff] [blame] | 1 | // Copyright 2017 The Chromium Authors. All rights reserved. |
| 2 | // Use of this source code is governed by a BSD-style license that can be |
| 3 | // found in the LICENSE file. |
| 4 | |
| 5 | #ifndef CHROME_BROWSER_UI_WEBUI_PREFS_INTERNALS_SOURCE_H_ |
| 6 | #define CHROME_BROWSER_UI_WEBUI_PREFS_INTERNALS_SOURCE_H_ |
| 7 | |
| 8 | #include "base/macros.h" |
| 9 | #include "content/public/browser/url_data_source.h" |
| 10 | |
| 11 | class Profile; |
| 12 | |
| 13 | // A simple data source that returns the preferences for the associated profile. |
| 14 | class PrefsInternalsSource : public content::URLDataSource { |
| 15 | public: |
| 16 | explicit PrefsInternalsSource(Profile* profile); |
| 17 | ~PrefsInternalsSource() override; |
| 18 | |
| 19 | // content::URLDataSource: |
Lucas Furukawa Gadani | 4b4eed0 | 2019-06-04 23:12:04 | [diff] [blame] | 20 | std::string GetSource() override; |
| 21 | std::string GetMimeType(const std::string& path) override; |
rdevlin.cronin | be084d2 | 2017-03-20 21:22:20 | [diff] [blame] | 22 | void StartDataRequest( |
Wei-Yin Chen (陳威尹) | 39f4ff3 | 2019-10-22 17:59:09 | [diff] [blame] | 23 | const GURL& url, |
John Abd-El-Malek | 92bf360 | 2019-07-31 02:25:48 | [diff] [blame] | 24 | const content::WebContents::Getter& wc_getter, |
danakj | f4b9e94 | 2019-11-29 15:43:04 | [diff] [blame^] | 25 | content::URLDataSource::GotDataCallback callback) override; |
rdevlin.cronin | be084d2 | 2017-03-20 21:22:20 | [diff] [blame] | 26 | |
| 27 | private: |
| 28 | Profile* profile_; |
| 29 | |
| 30 | DISALLOW_COPY_AND_ASSIGN(PrefsInternalsSource); |
| 31 | }; |
| 32 | |
| 33 | #endif // CHROME_BROWSER_UI_WEBUI_PREFS_INTERNALS_SOURCE_H_ |