| 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 29 matching lines...) Expand all Loading... |
| 40 // dictionary. | 40 // dictionary. |
| 41 virtual void AddLocalizedString(const std::string& name, int ids) = 0; | 41 virtual void AddLocalizedString(const std::string& name, int ids) = 0; |
| 42 | 42 |
| 43 // Add strings from |localized_strings| to our dictionary. | 43 // Add strings from |localized_strings| to our dictionary. |
| 44 virtual void AddLocalizedStrings( | 44 virtual void AddLocalizedStrings( |
| 45 const base::DictionaryValue& localized_strings) = 0; | 45 const base::DictionaryValue& localized_strings) = 0; |
| 46 | 46 |
| 47 // Adds a boolean keyed to its name to our dictionary. | 47 // Adds a boolean keyed to its name to our dictionary. |
| 48 virtual void AddBoolean(const std::string& name, bool value) = 0; | 48 virtual void AddBoolean(const std::string& name, bool value) = 0; |
| 49 | 49 |
| 50 // Adds an integer keyed to its name to our dictionary. |
| 51 virtual void AddInteger(const std::string& name, int value) = 0; |
| 52 |
| 50 // Sets the path which will return the JSON strings. | 53 // Sets the path which will return the JSON strings. |
| 51 virtual void SetJsonPath(const std::string& path) = 0; | 54 virtual void SetJsonPath(const std::string& path) = 0; |
| 52 | 55 |
| 53 // Adds a mapping between a path name and a resource to return. | 56 // Adds a mapping between a path name and a resource to return. |
| 54 virtual void AddResourcePath(const std::string& path, int resource_id) = 0; | 57 virtual void AddResourcePath(const std::string& path, int resource_id) = 0; |
| 55 | 58 |
| 56 // Sets the resource to returned when no other paths match. | 59 // Sets the resource to returned when no other paths match. |
| 57 virtual void SetDefaultResource(int resource_id) = 0; | 60 virtual void SetDefaultResource(int resource_id) = 0; |
| 58 | 61 |
| 59 // Used as a parameter to GotDataCallback. The caller has to run this callback | 62 // Used as a parameter to GotDataCallback. The caller has to run this callback |
| (...skipping 27 matching lines...) Expand all Loading... |
| 87 virtual void DisableDenyXFrameOptions() = 0; | 90 virtual void DisableDenyXFrameOptions() = 0; |
| 88 | 91 |
| 89 // Tells the loading code that resources are gzipped on disk. TODO(dbeam): | 92 // Tells the loading code that resources are gzipped on disk. TODO(dbeam): |
| 90 // write a streaming $i18n{} replacer and remove the "DisableI18n" part. | 93 // write a streaming $i18n{} replacer and remove the "DisableI18n" part. |
| 91 virtual void DisableI18nAndUseGzipForAllPaths() = 0; | 94 virtual void DisableI18nAndUseGzipForAllPaths() = 0; |
| 92 }; | 95 }; |
| 93 | 96 |
| 94 } // namespace content | 97 } // namespace content |
| 95 | 98 |
| 96 #endif // CONTENT_PUBLIC_BROWSER_WEB_UI_DATA_SOURCE_H_ | 99 #endif // CONTENT_PUBLIC_BROWSER_WEB_UI_DATA_SOURCE_H_ |
| OLD | NEW |