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

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

Issue 2744963002: Introduce InterfaceEndpointClient(IEC), InterfaceEndpointHandle and (Closed)
Patch Set: Throw the error with the string being the stack trace needed to debug layouts which don't output an… Created 3 years, 8 months 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
« no previous file with comments | « ios/web/ios_web_resources.grd ('k') | ios/web/webui/mojo_js_constants.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 <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 208 matching lines...) Expand 10 before | Expand all | Expand 10 after
219 {mojo::kControlMessageHandlerModuleName, 219 {mojo::kControlMessageHandlerModuleName,
220 IDR_MOJO_CONTROL_MESSAGE_HANDLER_JS}, 220 IDR_MOJO_CONTROL_MESSAGE_HANDLER_JS},
221 {mojo::kControlMessageProxyModuleName, IDR_MOJO_CONTROL_MESSAGE_PROXY_JS}, 221 {mojo::kControlMessageProxyModuleName, IDR_MOJO_CONTROL_MESSAGE_PROXY_JS},
222 {mojo::kInterfaceControlMessagesMojom, 222 {mojo::kInterfaceControlMessagesMojom,
223 IDR_MOJO_INTERFACE_CONTROL_MESSAGES_MOJOM_JS}, 223 IDR_MOJO_INTERFACE_CONTROL_MESSAGES_MOJOM_JS},
224 {mojo::kInterfaceTypesModuleName, IDR_MOJO_INTERFACE_TYPES_JS}, 224 {mojo::kInterfaceTypesModuleName, IDR_MOJO_INTERFACE_TYPES_JS},
225 {mojo::kRouterModuleName, IDR_MOJO_ROUTER_JS}, 225 {mojo::kRouterModuleName, IDR_MOJO_ROUTER_JS},
226 {mojo::kUnicodeModuleName, IDR_MOJO_UNICODE_JS}, 226 {mojo::kUnicodeModuleName, IDR_MOJO_UNICODE_JS},
227 {mojo::kValidatorModuleName, IDR_MOJO_VALIDATOR_JS}, 227 {mojo::kValidatorModuleName, IDR_MOJO_VALIDATOR_JS},
228 {web::kConsoleModuleName, IDR_IOS_CONSOLE_JS}, 228 {web::kConsoleModuleName, IDR_IOS_CONSOLE_JS},
229 {web::kTimerModuleName, IDR_IOS_TIMER_JS},
229 {web::kCoreModuleName, IDR_IOS_MOJO_CORE_JS}, 230 {web::kCoreModuleName, IDR_IOS_MOJO_CORE_JS},
230 {web::kHandleUtilModuleName, IDR_IOS_MOJO_HANDLE_UTIL_JS}, 231 {web::kHandleUtilModuleName, IDR_IOS_MOJO_HANDLE_UTIL_JS},
231 {web::kInterfaceProviderModuleName, IDR_IOS_SHELL_INTERFACE_PROVIDER_JS}, 232 {web::kInterfaceProviderModuleName, IDR_IOS_SHELL_INTERFACE_PROVIDER_JS},
232 {web::kSupportModuleName, IDR_IOS_MOJO_SUPPORT_JS}, 233 {web::kSupportModuleName, IDR_IOS_MOJO_SUPPORT_JS},
233 {web::kSyncMessageChannelModuleName, 234 {web::kSyncMessageChannelModuleName,
234 IDR_IOS_MOJO_SYNC_MESSAGE_CHANNEL_JS}, 235 IDR_IOS_MOJO_SYNC_MESSAGE_CHANNEL_JS},
236 {mojo::kPipeControlMessagesMojom,
237 IDR_MOJO_PIPE_CONTROL_MESSAGES_MOJOM_JS},
238 {mojo::kInterfaceEndpointClientModuleName,
239 IDR_MOJO_INTERFACE_ENDPOINT_CLIENT_JS},
240 {mojo::kInterfaceEndpointHandleModuleName,
241 IDR_MOJO_INTERFACE_ENDPOINT_HANDLE_JS},
242 {mojo::kPipeControlMessageHandlerModuleName,
243 IDR_MOJO_PIPE_CONTROL_MESSAGE_HANDLER_JS},
244 {mojo::kPipeControlMessageProxyModuleName,
245 IDR_MOJO_PIPE_CONTROL_MESSAGE_PROXY_JS},
235 }; 246 };
236 scoped_refptr<base::RefCountedMemory> scriptData( 247 scoped_refptr<base::RefCountedMemory> scriptData(
237 web::GetWebClient()->GetDataResourceBytes(resource_map[moduleName])); 248 web::GetWebClient()->GetDataResourceBytes(resource_map[moduleName]));
238 if (scriptData) { 249 if (scriptData) {
239 std::string script(reinterpret_cast<const char*>(scriptData->front()), 250 std::string script(reinterpret_cast<const char*>(scriptData->front()),
240 scriptData->size()); 251 scriptData->size());
241 [self executeMojoScript:script forModuleName:moduleName loadID:loadID]; 252 [self executeMojoScript:script forModuleName:moduleName loadID:loadID];
242 return YES; 253 return YES;
243 } 254 }
244 255
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
306 #pragma mark - Testing-Only Methods 317 #pragma mark - Testing-Only Methods
307 318
308 - (std::unique_ptr<web::URLFetcherBlockAdapter>) 319 - (std::unique_ptr<web::URLFetcherBlockAdapter>)
309 fetcherForURL:(const GURL&)URL 320 fetcherForURL:(const GURL&)URL
310 completionHandler:(web::URLFetcherBlockAdapterCompletion)handler { 321 completionHandler:(web::URLFetcherBlockAdapterCompletion)handler {
311 return base::MakeUnique<web::URLFetcherBlockAdapter>( 322 return base::MakeUnique<web::URLFetcherBlockAdapter>(
312 URL, _webState->GetBrowserState()->GetRequestContext(), handler); 323 URL, _webState->GetBrowserState()->GetRequestContext(), handler);
313 } 324 }
314 325
315 @end 326 @end
OLDNEW
« no previous file with comments | « ios/web/ios_web_resources.grd ('k') | ios/web/webui/mojo_js_constants.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698