| OLD | NEW |
| 1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 2012 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/web_state/ui/crw_web_controller.h" | 5 #import "ios/web/web_state/ui/crw_web_controller.h" |
| 6 | 6 |
| 7 #import <WebKit/WebKit.h> | 7 #import <WebKit/WebKit.h> |
| 8 | 8 |
| 9 #import <objc/runtime.h> | 9 #import <objc/runtime.h> |
| 10 #include <stddef.h> | 10 #include <stddef.h> |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 81 #import "ios/web/web_state/error_translation_util.h" | 81 #import "ios/web/web_state/error_translation_util.h" |
| 82 #import "ios/web/web_state/js/crw_js_plugin_placeholder_manager.h" | 82 #import "ios/web/web_state/js/crw_js_plugin_placeholder_manager.h" |
| 83 #import "ios/web/web_state/js/crw_js_post_request_loader.h" | 83 #import "ios/web/web_state/js/crw_js_post_request_loader.h" |
| 84 #import "ios/web/web_state/js/crw_js_window_id_manager.h" | 84 #import "ios/web/web_state/js/crw_js_window_id_manager.h" |
| 85 #import "ios/web/web_state/navigation_context_impl.h" | 85 #import "ios/web/web_state/navigation_context_impl.h" |
| 86 #import "ios/web/web_state/page_viewport_state.h" | 86 #import "ios/web/web_state/page_viewport_state.h" |
| 87 #import "ios/web/web_state/ui/crw_context_menu_controller.h" | 87 #import "ios/web/web_state/ui/crw_context_menu_controller.h" |
| 88 #import "ios/web/web_state/ui/crw_swipe_recognizer_provider.h" | 88 #import "ios/web/web_state/ui/crw_swipe_recognizer_provider.h" |
| 89 #import "ios/web/web_state/ui/crw_web_controller.h" | 89 #import "ios/web/web_state/ui/crw_web_controller.h" |
| 90 #import "ios/web/web_state/ui/crw_web_controller_container_view.h" | 90 #import "ios/web/web_state/ui/crw_web_controller_container_view.h" |
| 91 #import "ios/web/web_state/ui/crw_web_view_navigation_proxy.h" |
| 91 #import "ios/web/web_state/ui/crw_web_view_proxy_impl.h" | 92 #import "ios/web/web_state/ui/crw_web_view_proxy_impl.h" |
| 92 #import "ios/web/web_state/ui/crw_wk_navigation_states.h" | 93 #import "ios/web/web_state/ui/crw_wk_navigation_states.h" |
| 93 #import "ios/web/web_state/ui/crw_wk_script_message_router.h" | 94 #import "ios/web/web_state/ui/crw_wk_script_message_router.h" |
| 94 #import "ios/web/web_state/ui/wk_back_forward_list_item_holder.h" | 95 #import "ios/web/web_state/ui/wk_back_forward_list_item_holder.h" |
| 95 #import "ios/web/web_state/ui/wk_web_view_configuration_provider.h" | 96 #import "ios/web/web_state/ui/wk_web_view_configuration_provider.h" |
| 96 #import "ios/web/web_state/web_controller_observer_bridge.h" | 97 #import "ios/web/web_state/web_controller_observer_bridge.h" |
| 97 #import "ios/web/web_state/web_state_impl.h" | 98 #import "ios/web/web_state/web_state_impl.h" |
| 98 #import "ios/web/web_state/web_view_internal_creation_util.h" | 99 #import "ios/web/web_state/web_view_internal_creation_util.h" |
| 99 #import "ios/web/web_state/wk_web_view_security_util.h" | 100 #import "ios/web/web_state/wk_web_view_security_util.h" |
| 100 #import "ios/web/webui/crw_web_ui_manager.h" | 101 #import "ios/web/webui/crw_web_ui_manager.h" |
| (...skipping 1317 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1418 // necessary; this creates _containerView if it doesn't exist. | 1419 // necessary; this creates _containerView if it doesn't exist. |
| 1419 [self triggerPendingLoad]; | 1420 [self triggerPendingLoad]; |
| 1420 DCHECK(_containerView); | 1421 DCHECK(_containerView); |
| 1421 return _containerView; | 1422 return _containerView; |
| 1422 } | 1423 } |
| 1423 | 1424 |
| 1424 - (id<CRWWebViewProxy>)webViewProxy { | 1425 - (id<CRWWebViewProxy>)webViewProxy { |
| 1425 return _webViewProxy.get(); | 1426 return _webViewProxy.get(); |
| 1426 } | 1427 } |
| 1427 | 1428 |
| 1429 - (id<CRWWebViewNavigationProxy>)webViewNavigationProxy { |
| 1430 DCHECK( |
| 1431 [self.webView conformsToProtocol:@protocol(CRWWebViewNavigationProxy)]); |
| 1432 return static_cast<id<CRWWebViewNavigationProxy>>(self.webView); |
| 1433 } |
| 1434 |
| 1428 - (UIView*)viewForPrinting { | 1435 - (UIView*)viewForPrinting { |
| 1429 // Printing is not supported for native controllers. | 1436 // Printing is not supported for native controllers. |
| 1430 return _webView; | 1437 return _webView; |
| 1431 } | 1438 } |
| 1432 | 1439 |
| 1433 - (double)loadingProgress { | 1440 - (double)loadingProgress { |
| 1434 return [_webView estimatedProgress]; | 1441 return [_webView estimatedProgress]; |
| 1435 } | 1442 } |
| 1436 | 1443 |
| 1437 - (std::unique_ptr<web::NavigationContextImpl>)registerLoadRequestForURL: | 1444 - (std::unique_ptr<web::NavigationContextImpl>)registerLoadRequestForURL: |
| (...skipping 3772 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5210 - (NSUInteger)observerCount { | 5217 - (NSUInteger)observerCount { |
| 5211 DCHECK_EQ(_observerBridges.size(), [_observers count]); | 5218 DCHECK_EQ(_observerBridges.size(), [_observers count]); |
| 5212 return [_observers count]; | 5219 return [_observers count]; |
| 5213 } | 5220 } |
| 5214 | 5221 |
| 5215 - (NSString*)referrerFromNavigationAction:(WKNavigationAction*)action { | 5222 - (NSString*)referrerFromNavigationAction:(WKNavigationAction*)action { |
| 5216 return [action.request valueForHTTPHeaderField:kReferrerHeaderName]; | 5223 return [action.request valueForHTTPHeaderField:kReferrerHeaderName]; |
| 5217 } | 5224 } |
| 5218 | 5225 |
| 5219 @end | 5226 @end |
| OLD | NEW |