OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "ios/web/webui/web_ui_ios_data_source_impl.h" | 5 #include "ios/web/webui/web_ui_ios_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/strings/string_util.h" | 11 #include "base/strings/string_util.h" |
12 #include "ios/web/public/web_client.h" | 12 #import "ios/web/public/web_client.h" |
13 #include "ui/base/webui/jstemplate_builder.h" | 13 #include "ui/base/webui/jstemplate_builder.h" |
14 #include "ui/base/webui/web_ui_util.h" | 14 #include "ui/base/webui/web_ui_util.h" |
15 | 15 |
16 #if !defined(__has_feature) || !__has_feature(objc_arc) | 16 #if !defined(__has_feature) || !__has_feature(objc_arc) |
17 #error "This file requires ARC support." | 17 #error "This file requires ARC support." |
18 #endif | 18 #endif |
19 | 19 |
20 namespace web { | 20 namespace web { |
21 | 21 |
22 // static | 22 // static |
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
157 | 157 |
158 void WebUIIOSDataSourceImpl::SendFromResourceBundle( | 158 void WebUIIOSDataSourceImpl::SendFromResourceBundle( |
159 const URLDataSourceIOS::GotDataCallback& callback, | 159 const URLDataSourceIOS::GotDataCallback& callback, |
160 int idr) { | 160 int idr) { |
161 scoped_refptr<base::RefCountedMemory> response( | 161 scoped_refptr<base::RefCountedMemory> response( |
162 GetWebClient()->GetDataResourceBytes(idr)); | 162 GetWebClient()->GetDataResourceBytes(idr)); |
163 callback.Run(response); | 163 callback.Run(response); |
164 } | 164 } |
165 | 165 |
166 } // namespace web | 166 } // namespace web |
OLD | NEW |