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 12 matching lines...) Expand all Loading... |
23 public: | 23 public: |
24 virtual ~WebUIDataSource() {} | 24 virtual ~WebUIDataSource() {} |
25 | 25 |
26 CONTENT_EXPORT static WebUIDataSource* Create(const std::string& source_name); | 26 CONTENT_EXPORT static WebUIDataSource* Create(const std::string& source_name); |
27 | 27 |
28 // Adds a WebUI data source to |browser_context|. | 28 // Adds a WebUI data source to |browser_context|. |
29 CONTENT_EXPORT static void Add(BrowserContext* browser_context, | 29 CONTENT_EXPORT static void Add(BrowserContext* browser_context, |
30 WebUIDataSource* source); | 30 WebUIDataSource* source); |
31 | 31 |
32 // Adds a string keyed to its name to our dictionary. | 32 // Adds a string keyed to its name to our dictionary. |
33 virtual void AddString(const std::string& name, const string16& value) = 0; | 33 virtual void AddString(const std::string& name, |
| 34 const base::string16& value) = 0; |
34 | 35 |
35 // Adds a string keyed to its name to our dictionary. | 36 // Adds a string keyed to its name to our dictionary. |
36 virtual void AddString(const std::string& name, const std::string& value) = 0; | 37 virtual void AddString(const std::string& name, const std::string& value) = 0; |
37 | 38 |
38 // Adds a localized string with resource |ids| keyed to its name to our | 39 // Adds a localized string with resource |ids| keyed to its name to our |
39 // dictionary. | 40 // dictionary. |
40 virtual void AddLocalizedString(const std::string& name, int ids) = 0; | 41 virtual void AddLocalizedString(const std::string& name, int ids) = 0; |
41 | 42 |
42 // Add strings from |localized_strings| to our dictionary. | 43 // Add strings from |localized_strings| to our dictionary. |
43 virtual void AddLocalizedStrings( | 44 virtual void AddLocalizedStrings( |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
85 virtual void OverrideContentSecurityPolicyObjectSrc( | 86 virtual void OverrideContentSecurityPolicyObjectSrc( |
86 const std::string& data) = 0; | 87 const std::string& data) = 0; |
87 virtual void OverrideContentSecurityPolicyFrameSrc( | 88 virtual void OverrideContentSecurityPolicyFrameSrc( |
88 const std::string& data) = 0; | 89 const std::string& data) = 0; |
89 virtual void DisableDenyXFrameOptions() = 0; | 90 virtual void DisableDenyXFrameOptions() = 0; |
90 }; | 91 }; |
91 | 92 |
92 } // namespace content | 93 } // namespace content |
93 | 94 |
94 #endif // CONTENT_PUBLIC_BROWSER_WEB_UI_DATA_SOURCE_H_ | 95 #endif // CONTENT_PUBLIC_BROWSER_WEB_UI_DATA_SOURCE_H_ |
OLD | NEW |