| 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 "base/json/string_escape.h" | 7 #include "base/json/string_escape.h" |
| 8 #import "base/mac/bind_objc_block.h" | 8 #import "base/mac/bind_objc_block.h" |
| 9 #import "base/mac/scoped_nsobject.h" | 9 #import "base/mac/scoped_nsobject.h" |
| 10 #include "base/memory/ref_counted_memory.h" | 10 #include "base/memory/ref_counted_memory.h" |
| (...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 211 if (!arguments->GetString(1, &loadID)) { | 211 if (!arguments->GetString(1, &loadID)) { |
| 212 DLOG(WARNING) << "JS message parameter not found: Load ID"; | 212 DLOG(WARNING) << "JS message parameter not found: Load ID"; |
| 213 return NO; | 213 return NO; |
| 214 } | 214 } |
| 215 | 215 |
| 216 // Look for built-in scripts first. | 216 // Look for built-in scripts first. |
| 217 std::map<std::string, int> resource_map{ | 217 std::map<std::string, int> resource_map{ |
| 218 {mojo::kBindingsModuleName, IDR_MOJO_BINDINGS_JS}, | 218 {mojo::kBindingsModuleName, IDR_MOJO_BINDINGS_JS}, |
| 219 {mojo::kBufferModuleName, IDR_MOJO_BUFFER_JS}, | 219 {mojo::kBufferModuleName, IDR_MOJO_BUFFER_JS}, |
| 220 {mojo::kCodecModuleName, IDR_MOJO_CODEC_JS}, | 220 {mojo::kCodecModuleName, IDR_MOJO_CODEC_JS}, |
| 221 {mojo::kConnectionModuleName, IDR_MOJO_CONNECTION_JS}, | |
| 222 {mojo::kConnectorModuleName, IDR_MOJO_CONNECTOR_JS}, | 221 {mojo::kConnectorModuleName, IDR_MOJO_CONNECTOR_JS}, |
| 223 {mojo::kInterfaceTypesModuleName, IDR_MOJO_INTERFACE_TYPES_JS}, | 222 {mojo::kInterfaceTypesModuleName, IDR_MOJO_INTERFACE_TYPES_JS}, |
| 224 {mojo::kRouterModuleName, IDR_MOJO_ROUTER_JS}, | 223 {mojo::kRouterModuleName, IDR_MOJO_ROUTER_JS}, |
| 225 {mojo::kUnicodeModuleName, IDR_MOJO_UNICODE_JS}, | 224 {mojo::kUnicodeModuleName, IDR_MOJO_UNICODE_JS}, |
| 226 {mojo::kValidatorModuleName, IDR_MOJO_VALIDATOR_JS}, | 225 {mojo::kValidatorModuleName, IDR_MOJO_VALIDATOR_JS}, |
| 227 {web::kSyncMessageChannelModuleName, | 226 {web::kSyncMessageChannelModuleName, |
| 228 IDR_IOS_MOJO_SYNC_MESSAGE_CHANNEL_JS}, | 227 IDR_IOS_MOJO_SYNC_MESSAGE_CHANNEL_JS}, |
| 229 {web::kHandleUtilModuleName, IDR_IOS_MOJO_HANDLE_UTIL_JS}, | 228 {web::kHandleUtilModuleName, IDR_IOS_MOJO_HANDLE_UTIL_JS}, |
| 230 {web::kSupportModuleName, IDR_IOS_MOJO_SUPPORT_JS}, | 229 {web::kSupportModuleName, IDR_IOS_MOJO_SUPPORT_JS}, |
| 231 {web::kCoreModuleName, IDR_IOS_MOJO_CORE_JS}, | 230 {web::kCoreModuleName, IDR_IOS_MOJO_CORE_JS}, |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 301 | 300 |
| 302 - (std::unique_ptr<web::URLFetcherBlockAdapter>) | 301 - (std::unique_ptr<web::URLFetcherBlockAdapter>) |
| 303 fetcherForURL:(const GURL&)URL | 302 fetcherForURL:(const GURL&)URL |
| 304 completionHandler:(web::URLFetcherBlockAdapterCompletion)handler { | 303 completionHandler:(web::URLFetcherBlockAdapterCompletion)handler { |
| 305 return std::unique_ptr<web::URLFetcherBlockAdapter>( | 304 return std::unique_ptr<web::URLFetcherBlockAdapter>( |
| 306 new web::URLFetcherBlockAdapter( | 305 new web::URLFetcherBlockAdapter( |
| 307 URL, _webState->GetBrowserState()->GetRequestContext(), handler)); | 306 URL, _webState->GetBrowserState()->GetRequestContext(), handler)); |
| 308 } | 307 } |
| 309 | 308 |
| 310 @end | 309 @end |
| OLD | NEW |