Chromium Code Reviews| 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 if ([self.webView conformsToProtocol:@protocol(CRWWebViewNavigationProxy)]) { | |
|
Eugene But (OOO till 7-30)
2017/06/30 00:59:53
Sorry, should have mentioned in the previous round
danyao
2017/06/30 14:51:43
Done.
| |
| 1431 return static_cast<id<CRWWebViewNavigationProxy>>(self.webView); | |
| 1432 } | |
| 1433 return nil; | |
| 1434 } | |
| 1435 | |
| 1428 - (UIView*)viewForPrinting { | 1436 - (UIView*)viewForPrinting { |
| 1429 // Printing is not supported for native controllers. | 1437 // Printing is not supported for native controllers. |
| 1430 return _webView; | 1438 return _webView; |
| 1431 } | 1439 } |
| 1432 | 1440 |
| 1433 - (double)loadingProgress { | 1441 - (double)loadingProgress { |
| 1434 return [_webView estimatedProgress]; | 1442 return [_webView estimatedProgress]; |
| 1435 } | 1443 } |
| 1436 | 1444 |
| 1437 - (std::unique_ptr<web::NavigationContextImpl>)registerLoadRequestForURL: | 1445 - (std::unique_ptr<web::NavigationContextImpl>)registerLoadRequestForURL: |
| (...skipping 3763 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 5201 - (NSUInteger)observerCount { | 5209 - (NSUInteger)observerCount { |
| 5202 DCHECK_EQ(_observerBridges.size(), [_observers count]); | 5210 DCHECK_EQ(_observerBridges.size(), [_observers count]); |
| 5203 return [_observers count]; | 5211 return [_observers count]; |
| 5204 } | 5212 } |
| 5205 | 5213 |
| 5206 - (NSString*)referrerFromNavigationAction:(WKNavigationAction*)action { | 5214 - (NSString*)referrerFromNavigationAction:(WKNavigationAction*)action { |
| 5207 return [action.request valueForHTTPHeaderField:kReferrerHeaderName]; | 5215 return [action.request valueForHTTPHeaderField:kReferrerHeaderName]; |
| 5208 } | 5216 } |
| 5209 | 5217 |
| 5210 @end | 5218 @end |
| OLD | NEW |