| 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 <map> | 8 #include <map> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 67 friend class WebUIDataSourceTest; | 67 friend class WebUIDataSourceTest; |
| 68 | 68 |
| 69 explicit WebUIDataSourceImpl(const std::string& source_name); | 69 explicit WebUIDataSourceImpl(const std::string& source_name); |
| 70 | 70 |
| 71 // Methods that match URLDataSource which are called by | 71 // Methods that match URLDataSource which are called by |
| 72 // InternalDataSource. | 72 // InternalDataSource. |
| 73 std::string GetSource(); | 73 std::string GetSource(); |
| 74 std::string GetMimeType(const std::string& path) const; | 74 std::string GetMimeType(const std::string& path) const; |
| 75 void StartDataRequest( | 75 void StartDataRequest( |
| 76 const std::string& path, | 76 const std::string& path, |
| 77 bool is_incognito, | 77 const URLDataSource::ExtraRequestInfo& info, |
| 78 const URLDataSource::GotDataCallback& callback); | 78 const URLDataSource::GotDataCallback& callback); |
| 79 | 79 |
| 80 void disable_set_font_strings_for_testing() { | 80 void disable_set_font_strings_for_testing() { |
| 81 disable_set_font_strings_ = true; | 81 disable_set_font_strings_ = true; |
| 82 } | 82 } |
| 83 | 83 |
| 84 // The name of this source. | 84 // The name of this source. |
| 85 // E.g., for favicons, this could be "favicon", which results in paths for | 85 // E.g., for favicons, this could be "favicon", which results in paths for |
| 86 // specific resources like "favicon/34" getting sent to this source. | 86 // specific resources like "favicon/34" getting sent to this source. |
| 87 std::string source_name_; | 87 std::string source_name_; |
| (...skipping 10 matching lines...) Expand all Loading... |
| 98 std::string frame_src_; | 98 std::string frame_src_; |
| 99 bool deny_xframe_options_; | 99 bool deny_xframe_options_; |
| 100 bool disable_set_font_strings_; | 100 bool disable_set_font_strings_; |
| 101 | 101 |
| 102 DISALLOW_COPY_AND_ASSIGN(WebUIDataSourceImpl); | 102 DISALLOW_COPY_AND_ASSIGN(WebUIDataSourceImpl); |
| 103 }; | 103 }; |
| 104 | 104 |
| 105 } // content | 105 } // content |
| 106 | 106 |
| 107 #endif // CONTENT_BROWSER_WEBUI_WEB_UI_DATA_SOURCE_IMPL_H_ | 107 #endif // CONTENT_BROWSER_WEBUI_WEB_UI_DATA_SOURCE_IMPL_H_ |
| OLD | NEW |