| 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 #include "content/browser/webui/web_ui_data_source_impl.h" | 5 #include "content/browser/webui/web_ui_data_source_impl.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/memory/ref_counted_memory.h" | 10 #include "base/memory/ref_counted_memory.h" |
| 11 #include "base/string_util.h" | 11 #include "base/strings/string_util.h" |
| 12 #include "content/public/common/content_client.h" | 12 #include "content/public/common/content_client.h" |
| 13 #include "ui/webui/jstemplate_builder.h" | 13 #include "ui/webui/jstemplate_builder.h" |
| 14 #include "ui/webui/web_ui_util.h" | 14 #include "ui/webui/web_ui_util.h" |
| 15 | 15 |
| 16 namespace content { | 16 namespace content { |
| 17 | 17 |
| 18 WebUIDataSource* WebUIDataSource::Create(const std::string& source_name) { | 18 WebUIDataSource* WebUIDataSource::Create(const std::string& source_name) { |
| 19 return new WebUIDataSourceImpl(source_name); | 19 return new WebUIDataSourceImpl(source_name); |
| 20 } | 20 } |
| 21 | 21 |
| (...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 210 } | 210 } |
| 211 | 211 |
| 212 void WebUIDataSourceImpl::SendFromResourceBundle( | 212 void WebUIDataSourceImpl::SendFromResourceBundle( |
| 213 const URLDataSource::GotDataCallback& callback, int idr) { | 213 const URLDataSource::GotDataCallback& callback, int idr) { |
| 214 scoped_refptr<base::RefCountedStaticMemory> response( | 214 scoped_refptr<base::RefCountedStaticMemory> response( |
| 215 GetContentClient()->GetDataResourceBytes(idr)); | 215 GetContentClient()->GetDataResourceBytes(idr)); |
| 216 callback.Run(response.get()); | 216 callback.Run(response.get()); |
| 217 } | 217 } |
| 218 | 218 |
| 219 } // namespace content | 219 } // namespace content |
| OLD | NEW |