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 <stddef.h> |
| 8 |
7 #include <string> | 9 #include <string> |
8 | 10 |
9 #include "base/bind.h" | 11 #include "base/bind.h" |
| 12 #include "base/macros.h" |
10 #include "base/memory/ref_counted_memory.h" | 13 #include "base/memory/ref_counted_memory.h" |
11 #include "base/strings/string_util.h" | 14 #include "base/strings/string_util.h" |
12 #include "content/grit/content_resources.h" | 15 #include "content/grit/content_resources.h" |
13 #include "content/public/browser/content_browser_client.h" | 16 #include "content/public/browser/content_browser_client.h" |
14 #include "content/public/common/content_client.h" | 17 #include "content/public/common/content_client.h" |
15 #include "mojo/public/js/constants.h" | 18 #include "mojo/public/js/constants.h" |
16 #include "ui/base/webui/jstemplate_builder.h" | 19 #include "ui/base/webui/jstemplate_builder.h" |
17 #include "ui/base/webui/web_ui_util.h" | 20 #include "ui/base/webui/web_ui_util.h" |
18 | 21 |
19 namespace content { | 22 namespace content { |
(...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
238 } | 241 } |
239 | 242 |
240 void WebUIDataSourceImpl::SendFromResourceBundle( | 243 void WebUIDataSourceImpl::SendFromResourceBundle( |
241 const URLDataSource::GotDataCallback& callback, int idr) { | 244 const URLDataSource::GotDataCallback& callback, int idr) { |
242 scoped_refptr<base::RefCountedStaticMemory> response( | 245 scoped_refptr<base::RefCountedStaticMemory> response( |
243 GetContentClient()->GetDataResourceBytes(idr)); | 246 GetContentClient()->GetDataResourceBytes(idr)); |
244 callback.Run(response.get()); | 247 callback.Run(response.get()); |
245 } | 248 } |
246 | 249 |
247 } // namespace content | 250 } // namespace content |
OLD | NEW |