| 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 1840 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1851 - (id<CRWWebViewProxy>)webViewProxy { | 1851 - (id<CRWWebViewProxy>)webViewProxy { |
| 1852 return _webViewProxy.get(); | 1852 return _webViewProxy.get(); |
| 1853 } | 1853 } |
| 1854 | 1854 |
| 1855 - (UIView*)viewForPrinting { | 1855 - (UIView*)viewForPrinting { |
| 1856 // TODO(ios): crbug.com/227944. Printing is not supported for native | 1856 // TODO(ios): crbug.com/227944. Printing is not supported for native |
| 1857 // controllers. | 1857 // controllers. |
| 1858 return self.webView; | 1858 return self.webView; |
| 1859 } | 1859 } |
| 1860 | 1860 |
| 1861 - (double)loadingProgress { |
| 1862 return [_webView estimatedProgress]; |
| 1863 } |
| 1864 |
| 1861 - (void)registerLoadRequest:(const GURL&)URL { | 1865 - (void)registerLoadRequest:(const GURL&)URL { |
| 1862 // Get the navigation type from the last main frame load request, and try to | 1866 // Get the navigation type from the last main frame load request, and try to |
| 1863 // map that to a PageTransition. | 1867 // map that to a PageTransition. |
| 1864 WKNavigationType navigationType = | 1868 WKNavigationType navigationType = |
| 1865 _pendingNavigationInfo ? [_pendingNavigationInfo navigationType] | 1869 _pendingNavigationInfo ? [_pendingNavigationInfo navigationType] |
| 1866 : WKNavigationTypeOther; | 1870 : WKNavigationTypeOther; |
| 1867 ui::PageTransition transition = ui::PAGE_TRANSITION_CLIENT_REDIRECT; | 1871 ui::PageTransition transition = ui::PAGE_TRANSITION_CLIENT_REDIRECT; |
| 1868 switch (navigationType) { | 1872 switch (navigationType) { |
| 1869 case WKNavigationTypeLinkActivated: | 1873 case WKNavigationTypeLinkActivated: |
| 1870 transition = ui::PAGE_TRANSITION_LINK; | 1874 transition = ui::PAGE_TRANSITION_LINK; |
| (...skipping 3898 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5769 } | 5773 } |
| 5770 | 5774 |
| 5771 return web::WEB_VIEW_DOCUMENT_TYPE_GENERIC; | 5775 return web::WEB_VIEW_DOCUMENT_TYPE_GENERIC; |
| 5772 } | 5776 } |
| 5773 | 5777 |
| 5774 - (NSString*)refererFromNavigationAction:(WKNavigationAction*)action { | 5778 - (NSString*)refererFromNavigationAction:(WKNavigationAction*)action { |
| 5775 return [action.request valueForHTTPHeaderField:@"Referer"]; | 5779 return [action.request valueForHTTPHeaderField:@"Referer"]; |
| 5776 } | 5780 } |
| 5777 | 5781 |
| 5778 @end | 5782 @end |
| OLD | NEW |