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 CHROME_BROWSER_UI_WEBUI_CHROME_WEB_UI_DATA_SOURCE_H_ | 5 #ifndef CONTENT_BROWSER_WEBUI_WEB_UI_DATA_SOURCE_H_ |
6 #define CHROME_BROWSER_UI_WEBUI_CHROME_WEB_UI_DATA_SOURCE_H_ | 6 #define CONTENT_BROWSER_WEBUI_WEB_UI_DATA_SOURCE_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <string> | 9 #include <string> |
10 | 10 |
11 #include "base/basictypes.h" | 11 #include "base/basictypes.h" |
12 #include "base/callback.h" | 12 #include "base/callback.h" |
13 #include "base/compiler_specific.h" | 13 #include "base/compiler_specific.h" |
14 #include "base/values.h" | 14 #include "base/values.h" |
15 #include "chrome/browser/ui/webui/chrome_url_data_manager.h" | 15 #include "chrome/browser/ui/webui/chrome_url_data_manager.h" |
16 #include "content/public/browser/url_data_source.h" | 16 #include "content/public/browser/url_data_source.h" |
17 #include "content/public/browser/web_ui_data_source.h" | 17 #include "content/public/browser/web_ui_data_source.h" |
| 18 #include "content/common/content_export.h" |
18 | 19 |
19 // A data source that can help with implementing the common operations | 20 // A data source that can help with implementing the common operations |
20 // needed by the chrome WEBUI settings/history/downloads pages. | 21 // needed by the chrome WEBUI settings/history/downloads pages. |
21 // DO NOT DERIVE FROM THIS CLASS! http://crbug.com/169170 | |
22 class ChromeWebUIDataSource : public URLDataSourceImpl, | 22 class ChromeWebUIDataSource : public URLDataSourceImpl, |
23 public content::WebUIDataSource { | 23 public content::WebUIDataSource { |
24 public: | 24 public: |
25 static content::WebUIDataSource* Create(const std::string& source_name); | 25 CONTENT_EXPORT static content::WebUIDataSource* Create(const std::string& sour
ce_name); |
26 | 26 |
27 // content::WebUIDataSource implementation: | 27 // content::WebUIDataSource implementation: |
28 virtual void AddString(const std::string& name, | 28 virtual void AddString(const std::string& name, |
29 const string16& value) OVERRIDE; | 29 const string16& value) OVERRIDE; |
30 virtual void AddString(const std::string& name, | 30 virtual void AddString(const std::string& name, |
31 const std::string& value) OVERRIDE; | 31 const std::string& value) OVERRIDE; |
32 virtual void AddLocalizedString(const std::string& name, int ids) OVERRIDE; | 32 virtual void AddLocalizedString(const std::string& name, int ids) OVERRIDE; |
33 virtual void AddLocalizedStrings( | 33 virtual void AddLocalizedStrings( |
34 const DictionaryValue& localized_strings) OVERRIDE; | 34 const DictionaryValue& localized_strings) OVERRIDE; |
35 virtual void AddBoolean(const std::string& name, bool value) OVERRIDE; | 35 virtual void AddBoolean(const std::string& name, bool value) OVERRIDE; |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
87 bool add_csp_; | 87 bool add_csp_; |
88 bool object_src_set_; | 88 bool object_src_set_; |
89 std::string object_src_; | 89 std::string object_src_; |
90 bool frame_src_set_; | 90 bool frame_src_set_; |
91 std::string frame_src_; | 91 std::string frame_src_; |
92 bool deny_xframe_options_; | 92 bool deny_xframe_options_; |
93 | 93 |
94 DISALLOW_COPY_AND_ASSIGN(ChromeWebUIDataSource); | 94 DISALLOW_COPY_AND_ASSIGN(ChromeWebUIDataSource); |
95 }; | 95 }; |
96 | 96 |
97 #endif // CHROME_BROWSER_UI_WEBUI_CHROME_WEB_UI_DATA_SOURCE_H_ | 97 #endif // CONTENT_BROWSER_WEBUI_WEB_UI_DATA_SOURCE_H_ |
OLD | NEW |