Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(79)

Side by Side Diff: ios/web/web_state/ui/crw_ui_simple_web_view_controller.mm

Issue 1171203004: Correct iOS build for latest Xcode beta. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Nits Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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_ui_simple_web_view_controller.h" 5 #import "ios/web/web_state/ui/crw_ui_simple_web_view_controller.h"
6 6
7 #include "base/ios/weak_nsobject.h" 7 #include "base/ios/weak_nsobject.h"
8 #import "base/logging.h" 8 #import "base/logging.h"
9 #import "base/mac/scoped_nsobject.h" 9 #import "base/mac/scoped_nsobject.h"
10 10
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 - (id<CRWSimpleWebViewControllerDelegate>)delegate { 65 - (id<CRWSimpleWebViewControllerDelegate>)delegate {
66 return _delegate.get(); 66 return _delegate.get();
67 } 67 }
68 68
69 - (void)loadPDFAtFilePath:(NSString*)filePath { 69 - (void)loadPDFAtFilePath:(NSString*)filePath {
70 DCHECK([[NSFileManager defaultManager] fileExistsAtPath:filePath]); 70 DCHECK([[NSFileManager defaultManager] fileExistsAtPath:filePath]);
71 NSData* data = [NSData dataWithContentsOfFile:filePath]; 71 NSData* data = [NSData dataWithContentsOfFile:filePath];
72 [_webView loadData:data 72 [_webView loadData:data
73 MIMEType:@"application/pdf" 73 MIMEType:@"application/pdf"
74 textEncodingName:@"utf-8" 74 textEncodingName:@"utf-8"
75 baseURL:nil]; 75 baseURL:[NSURL URLWithString:@""]];
76 } 76 }
77 77
78 - (void)evaluateJavaScript:(NSString*)script 78 - (void)evaluateJavaScript:(NSString*)script
79 stringResultHandler:(web::JavaScriptCompletion)handler { 79 stringResultHandler:(web::JavaScriptCompletion)handler {
80 web::EvaluateJavaScript(_webView, script, handler); 80 web::EvaluateJavaScript(_webView, script, handler);
81 } 81 }
82 82
83 #pragma mark - 83 #pragma mark -
84 #pragma mark UIWebViewDelegateMethods 84 #pragma mark UIWebViewDelegateMethods
85 85
(...skipping 11 matching lines...) Expand all
97 97
98 - (void)webViewDidFinishLoad:(UIWebView*)webView { 98 - (void)webViewDidFinishLoad:(UIWebView*)webView {
99 if (![_delegate respondsToSelector:@selector(simpleWebViewController: 99 if (![_delegate respondsToSelector:@selector(simpleWebViewController:
100 titleMayHaveChanged:)]) { 100 titleMayHaveChanged:)]) {
101 return; 101 return;
102 } 102 }
103 [_delegate simpleWebViewController:self titleMayHaveChanged:self.title]; 103 [_delegate simpleWebViewController:self titleMayHaveChanged:self.title];
104 } 104 }
105 105
106 @end 106 @end
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698