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

Side by Side Diff: ios/web_view/internal/cwv_web_view.mm

Issue 2764773002: Add CWVUserContentController which enables injecting JavaScripts. (Closed)
Patch Set: Rebase. Created 3 years, 9 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_view/public/cwv_web_view.h" 5 #import "ios/web_view/public/cwv_web_view.h"
6 6
7 #include <memory> 7 #include <memory>
8 #include <utility> 8 #include <utility>
9 9
10 #import "base/ios/weak_nsobject.h" 10 #import "base/ios/weak_nsobject.h"
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 } 47 }
48 48
49 // Redefine the property as readwrite to define -setEstimatedProgress:, which 49 // Redefine the property as readwrite to define -setEstimatedProgress:, which
50 // can be used to send KVO notification. 50 // can be used to send KVO notification.
51 @property(nonatomic, readwrite) double estimatedProgress; 51 @property(nonatomic, readwrite) double estimatedProgress;
52 52
53 @end 53 @end
54 54
55 @implementation CWVWebView 55 @implementation CWVWebView
56 56
57 @synthesize configuration = _configuration;
57 @synthesize navigationDelegate = _navigationDelegate; 58 @synthesize navigationDelegate = _navigationDelegate;
58 @synthesize translationDelegate = _translationDelegate; 59 @synthesize translationDelegate = _translationDelegate;
59 @synthesize estimatedProgress = _estimatedProgress; 60 @synthesize estimatedProgress = _estimatedProgress;
60 @synthesize UIDelegate = _UIDelegate; 61 @synthesize UIDelegate = _UIDelegate;
61 62
62 - (instancetype)initWithFrame:(CGRect)frame 63 - (instancetype)initWithFrame:(CGRect)frame
63 configuration:(CWVWebViewConfiguration*)configuration { 64 configuration:(CWVWebViewConfiguration*)configuration {
64 self = [super initWithFrame:frame]; 65 self = [super initWithFrame:frame];
65 if (self) { 66 if (self) {
66 _configuration = [configuration copy]; 67 _configuration = [configuration copy];
(...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after
262 [_UIDelegate webViewDidClose:self]; 263 [_UIDelegate webViewDidClose:self];
263 } 264 }
264 } 265 }
265 266
266 - (web::JavaScriptDialogPresenter*)javaScriptDialogPresenterForWebState: 267 - (web::JavaScriptDialogPresenter*)javaScriptDialogPresenterForWebState:
267 (web::WebState*)webState { 268 (web::WebState*)webState {
268 return _javaScriptDialogPresenter.get(); 269 return _javaScriptDialogPresenter.get();
269 } 270 }
270 271
271 @end 272 @end
OLDNEW
« no previous file with comments | « ios/web_view/internal/cwv_user_script.mm ('k') | ios/web_view/internal/cwv_web_view_configuration.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698