OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 #import "ios/web/webui/crw_web_ui_manager.h" | 5 #import "ios/web/webui/crw_web_ui_manager.h" |
6 | 6 |
7 #include <memory> | 7 #include <memory> |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/json/string_escape.h" | 10 #include "base/json/string_escape.h" |
(...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
205 return NO; | 205 return NO; |
206 } | 206 } |
207 std::string loadID; | 207 std::string loadID; |
208 if (!arguments->GetString(1, &loadID)) { | 208 if (!arguments->GetString(1, &loadID)) { |
209 DLOG(WARNING) << "JS message parameter not found: Load ID"; | 209 DLOG(WARNING) << "JS message parameter not found: Load ID"; |
210 return NO; | 210 return NO; |
211 } | 211 } |
212 | 212 |
213 // Look for built-in scripts first. | 213 // Look for built-in scripts first. |
214 std::map<std::string, int> resource_map{ | 214 std::map<std::string, int> resource_map{ |
| 215 {mojo::kAssociatedBindingsModuleName, IDR_MOJO_ASSOCIATED_BINDINGS_JS}, |
215 {mojo::kBindingsModuleName, IDR_MOJO_BINDINGS_JS}, | 216 {mojo::kBindingsModuleName, IDR_MOJO_BINDINGS_JS}, |
216 {mojo::kBufferModuleName, IDR_MOJO_BUFFER_JS}, | 217 {mojo::kBufferModuleName, IDR_MOJO_BUFFER_JS}, |
217 {mojo::kCodecModuleName, IDR_MOJO_CODEC_JS}, | 218 {mojo::kCodecModuleName, IDR_MOJO_CODEC_JS}, |
218 {mojo::kConnectorModuleName, IDR_MOJO_CONNECTOR_JS}, | 219 {mojo::kConnectorModuleName, IDR_MOJO_CONNECTOR_JS}, |
219 {mojo::kControlMessageHandlerModuleName, | 220 {mojo::kControlMessageHandlerModuleName, |
220 IDR_MOJO_CONTROL_MESSAGE_HANDLER_JS}, | 221 IDR_MOJO_CONTROL_MESSAGE_HANDLER_JS}, |
221 {mojo::kControlMessageProxyModuleName, IDR_MOJO_CONTROL_MESSAGE_PROXY_JS}, | 222 {mojo::kControlMessageProxyModuleName, IDR_MOJO_CONTROL_MESSAGE_PROXY_JS}, |
222 {mojo::kInterfaceControlMessagesMojom, | 223 {mojo::kInterfaceControlMessagesMojom, |
223 IDR_MOJO_INTERFACE_CONTROL_MESSAGES_MOJOM_JS}, | 224 IDR_MOJO_INTERFACE_CONTROL_MESSAGES_MOJOM_JS}, |
224 {mojo::kInterfaceTypesModuleName, IDR_MOJO_INTERFACE_TYPES_JS}, | 225 {mojo::kInterfaceTypesModuleName, IDR_MOJO_INTERFACE_TYPES_JS}, |
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
317 #pragma mark - Testing-Only Methods | 318 #pragma mark - Testing-Only Methods |
318 | 319 |
319 - (std::unique_ptr<web::URLFetcherBlockAdapter>) | 320 - (std::unique_ptr<web::URLFetcherBlockAdapter>) |
320 fetcherForURL:(const GURL&)URL | 321 fetcherForURL:(const GURL&)URL |
321 completionHandler:(web::URLFetcherBlockAdapterCompletion)handler { | 322 completionHandler:(web::URLFetcherBlockAdapterCompletion)handler { |
322 return base::MakeUnique<web::URLFetcherBlockAdapter>( | 323 return base::MakeUnique<web::URLFetcherBlockAdapter>( |
323 URL, _webState->GetBrowserState()->GetRequestContext(), handler); | 324 URL, _webState->GetBrowserState()->GetRequestContext(), handler); |
324 } | 325 } |
325 | 326 |
326 @end | 327 @end |
OLD | NEW |