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" |
11 #import "base/mac/bind_objc_block.h" | 11 #import "base/mac/bind_objc_block.h" |
12 #import "base/mac/scoped_nsobject.h" | 12 #import "base/mac/scoped_nsobject.h" |
13 #include "base/memory/ptr_util.h" | 13 #include "base/memory/ptr_util.h" |
14 #include "base/memory/ref_counted_memory.h" | 14 #include "base/memory/ref_counted_memory.h" |
15 #include "base/strings/stringprintf.h" | 15 #include "base/strings/stringprintf.h" |
16 #import "base/strings/sys_string_conversions.h" | 16 #import "base/strings/sys_string_conversions.h" |
17 #include "base/strings/utf_string_conversions.h" | 17 #include "base/strings/utf_string_conversions.h" |
18 #include "base/values.h" | 18 #include "base/values.h" |
19 #include "ios/web/grit/ios_web_resources.h" | 19 #include "ios/web/grit/ios_web_resources.h" |
20 #include "ios/web/public/browser_state.h" | 20 #include "ios/web/public/browser_state.h" |
21 #import "ios/web/public/web_client.h" | 21 #import "ios/web/public/web_client.h" |
22 #include "ios/web/public/web_state/navigation_context.h" | 22 #import "ios/web/public/web_state/navigation_context.h" |
23 #import "ios/web/public/web_state/web_state_observer_bridge.h" | 23 #import "ios/web/public/web_state/web_state_observer_bridge.h" |
24 #import "ios/web/web_state/web_state_impl.h" | 24 #import "ios/web/web_state/web_state_impl.h" |
25 #import "ios/web/webui/crw_web_ui_page_builder.h" | 25 #import "ios/web/webui/crw_web_ui_page_builder.h" |
26 #include "ios/web/webui/mojo_js_constants.h" | 26 #include "ios/web/webui/mojo_js_constants.h" |
27 #import "ios/web/webui/url_fetcher_block_adapter.h" | 27 #import "ios/web/webui/url_fetcher_block_adapter.h" |
28 #include "mojo/public/js/constants.h" | 28 #include "mojo/public/js/constants.h" |
29 #import "net/base/mac/url_conversions.h" | 29 #import "net/base/mac/url_conversions.h" |
30 | 30 |
31 #if !defined(__has_feature) || !__has_feature(objc_arc) | 31 #if !defined(__has_feature) || !__has_feature(objc_arc) |
32 #error "This file requires ARC support." | 32 #error "This file requires ARC support." |
(...skipping 282 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
315 #pragma mark - Testing-Only Methods | 315 #pragma mark - Testing-Only Methods |
316 | 316 |
317 - (std::unique_ptr<web::URLFetcherBlockAdapter>) | 317 - (std::unique_ptr<web::URLFetcherBlockAdapter>) |
318 fetcherForURL:(const GURL&)URL | 318 fetcherForURL:(const GURL&)URL |
319 completionHandler:(web::URLFetcherBlockAdapterCompletion)handler { | 319 completionHandler:(web::URLFetcherBlockAdapterCompletion)handler { |
320 return base::MakeUnique<web::URLFetcherBlockAdapter>( | 320 return base::MakeUnique<web::URLFetcherBlockAdapter>( |
321 URL, _webState->GetBrowserState()->GetRequestContext(), handler); | 321 URL, _webState->GetBrowserState()->GetRequestContext(), handler); |
322 } | 322 } |
323 | 323 |
324 @end | 324 @end |
OLD | NEW |