Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(625)

Side by Side Diff: ios/web/webui/crw_web_ui_manager.mm

Issue 2556353004: Mojo JS bindings: code generator maps interface ptr and request to InterfacePtr and InterfaceReques… (Closed)
Patch Set: . Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 #include "base/mac/bind_objc_block.h" 8 #include "base/mac/bind_objc_block.h"
9 #include "base/mac/scoped_nsobject.h" 9 #include "base/mac/scoped_nsobject.h"
10 #include "base/memory/ref_counted_memory.h" 10 #include "base/memory/ref_counted_memory.h"
(...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after
245 return NO; 245 return NO;
246 } 246 }
247 247
248 // Look for built-in scripts first. 248 // Look for built-in scripts first.
249 std::map<std::string, int> resource_map{ 249 std::map<std::string, int> resource_map{
250 {mojo::kBindingsModuleName, IDR_MOJO_BINDINGS_JS}, 250 {mojo::kBindingsModuleName, IDR_MOJO_BINDINGS_JS},
251 {mojo::kBufferModuleName, IDR_MOJO_BUFFER_JS}, 251 {mojo::kBufferModuleName, IDR_MOJO_BUFFER_JS},
252 {mojo::kCodecModuleName, IDR_MOJO_CODEC_JS}, 252 {mojo::kCodecModuleName, IDR_MOJO_CODEC_JS},
253 {mojo::kConnectionModuleName, IDR_MOJO_CONNECTION_JS}, 253 {mojo::kConnectionModuleName, IDR_MOJO_CONNECTION_JS},
254 {mojo::kConnectorModuleName, IDR_MOJO_CONNECTOR_JS}, 254 {mojo::kConnectorModuleName, IDR_MOJO_CONNECTOR_JS},
255 {mojo::kInterfaceTypesModuleName, IDR_MOJO_INTERFACE_TYPES_JS},
255 {mojo::kRouterModuleName, IDR_MOJO_ROUTER_JS}, 256 {mojo::kRouterModuleName, IDR_MOJO_ROUTER_JS},
256 {mojo::kUnicodeModuleName, IDR_MOJO_UNICODE_JS}, 257 {mojo::kUnicodeModuleName, IDR_MOJO_UNICODE_JS},
257 {mojo::kValidatorModuleName, IDR_MOJO_VALIDATOR_JS}, 258 {mojo::kValidatorModuleName, IDR_MOJO_VALIDATOR_JS},
258 {web::kSyncMessageChannelModuleName, 259 {web::kSyncMessageChannelModuleName,
259 IDR_IOS_MOJO_SYNC_MESSAGE_CHANNEL_JS}, 260 IDR_IOS_MOJO_SYNC_MESSAGE_CHANNEL_JS},
260 {web::kHandleUtilModuleName, IDR_IOS_MOJO_HANDLE_UTIL_JS}, 261 {web::kHandleUtilModuleName, IDR_IOS_MOJO_HANDLE_UTIL_JS},
261 {web::kSupportModuleName, IDR_IOS_MOJO_SUPPORT_JS}, 262 {web::kSupportModuleName, IDR_IOS_MOJO_SUPPORT_JS},
262 {web::kCoreModuleName, IDR_IOS_MOJO_CORE_JS}, 263 {web::kCoreModuleName, IDR_IOS_MOJO_CORE_JS},
263 {web::kInterfaceProviderModuleName, IDR_IOS_SHELL_INTERFACE_PROVIDER_JS}, 264 {web::kInterfaceProviderModuleName, IDR_IOS_SHELL_INTERFACE_PROVIDER_JS},
264 }; 265 };
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
332 333
333 - (std::unique_ptr<web::URLFetcherBlockAdapter>) 334 - (std::unique_ptr<web::URLFetcherBlockAdapter>)
334 fetcherForURL:(const GURL&)URL 335 fetcherForURL:(const GURL&)URL
335 completionHandler:(web::URLFetcherBlockAdapterCompletion)handler { 336 completionHandler:(web::URLFetcherBlockAdapterCompletion)handler {
336 return std::unique_ptr<web::URLFetcherBlockAdapter>( 337 return std::unique_ptr<web::URLFetcherBlockAdapter>(
337 new web::URLFetcherBlockAdapter( 338 new web::URLFetcherBlockAdapter(
338 URL, _webState->GetBrowserState()->GetRequestContext(), handler)); 339 URL, _webState->GetBrowserState()->GetRequestContext(), handler));
339 } 340 }
340 341
341 @end 342 @end
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698