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 #include "base/mac/bind_objc_block.h" | 8 #import "base/mac/bind_objc_block.h" |
9 #include "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" |
11 #include "base/memory/scoped_vector.h" | 11 #include "base/memory/scoped_vector.h" |
12 #include "base/strings/stringprintf.h" | 12 #include "base/strings/stringprintf.h" |
13 #import "base/strings/sys_string_conversions.h" | 13 #import "base/strings/sys_string_conversions.h" |
14 #include "base/strings/utf_string_conversions.h" | 14 #include "base/strings/utf_string_conversions.h" |
15 #include "base/values.h" | 15 #include "base/values.h" |
16 #include "ios/web/grit/ios_web_resources.h" | 16 #include "ios/web/grit/ios_web_resources.h" |
17 #import "ios/web/net/request_group_util.h" | 17 #import "ios/web/net/request_group_util.h" |
18 #include "ios/web/public/browser_state.h" | 18 #include "ios/web/public/browser_state.h" |
19 #include "ios/web/public/web_client.h" | 19 #import "ios/web/public/web_client.h" |
20 #import "ios/web/public/web_state/web_state_observer_bridge.h" | 20 #import "ios/web/public/web_state/web_state_observer_bridge.h" |
21 #include "ios/web/web_state/web_state_impl.h" | 21 #import "ios/web/web_state/web_state_impl.h" |
22 #import "ios/web/webui/crw_web_ui_page_builder.h" | 22 #import "ios/web/webui/crw_web_ui_page_builder.h" |
23 #include "ios/web/webui/mojo_js_constants.h" | 23 #include "ios/web/webui/mojo_js_constants.h" |
24 #include "ios/web/webui/url_fetcher_block_adapter.h" | 24 #import "ios/web/webui/url_fetcher_block_adapter.h" |
25 #include "mojo/public/js/constants.h" | 25 #include "mojo/public/js/constants.h" |
26 #import "net/base/mac/url_conversions.h" | 26 #import "net/base/mac/url_conversions.h" |
27 | 27 |
28 #if !defined(__has_feature) || !__has_feature(objc_arc) | 28 #if !defined(__has_feature) || !__has_feature(objc_arc) |
29 #error "This file requires ARC support." | 29 #error "This file requires ARC support." |
30 #endif | 30 #endif |
31 | 31 |
32 namespace { | 32 namespace { |
33 // Prefix for JavaScript messages. | 33 // Prefix for JavaScript messages. |
34 const char kScriptCommandPrefix[] = "webui"; | 34 const char kScriptCommandPrefix[] = "webui"; |
(...skipping 266 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
301 | 301 |
302 - (std::unique_ptr<web::URLFetcherBlockAdapter>) | 302 - (std::unique_ptr<web::URLFetcherBlockAdapter>) |
303 fetcherForURL:(const GURL&)URL | 303 fetcherForURL:(const GURL&)URL |
304 completionHandler:(web::URLFetcherBlockAdapterCompletion)handler { | 304 completionHandler:(web::URLFetcherBlockAdapterCompletion)handler { |
305 return std::unique_ptr<web::URLFetcherBlockAdapter>( | 305 return std::unique_ptr<web::URLFetcherBlockAdapter>( |
306 new web::URLFetcherBlockAdapter( | 306 new web::URLFetcherBlockAdapter( |
307 URL, _webState->GetBrowserState()->GetRequestContext(), handler)); | 307 URL, _webState->GetBrowserState()->GetRequestContext(), handler)); |
308 } | 308 } |
309 | 309 |
310 @end | 310 @end |
OLD | NEW |