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

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

Issue 1646573002: WebViewProxy now propagates first responder status to the webview. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 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
« no previous file with comments | « ios/web/web_state/crw_web_view_proxy_impl.mm ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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/public/web_state/ui/crw_web_view_content_view.h" 5 #import "ios/web/public/web_state/ui/crw_web_view_content_view.h"
6 6
7 #import <WebKit/WebKit.h> 7 #import <WebKit/WebKit.h>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/mac/scoped_nsobject.h" 10 #include "base/mac/scoped_nsobject.h"
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 self.autoresizingMask = 75 self.autoresizingMask =
76 UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight; 76 UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight;
77 [self addSubview:_webView]; 77 [self addSubview:_webView];
78 self.backgroundColor = [UIColor colorWithRed:kBackgroundRGBComponents[0] 78 self.backgroundColor = [UIColor colorWithRed:kBackgroundRGBComponents[0]
79 green:kBackgroundRGBComponents[1] 79 green:kBackgroundRGBComponents[1]
80 blue:kBackgroundRGBComponents[2] 80 blue:kBackgroundRGBComponents[2]
81 alpha:1.0]; 81 alpha:1.0];
82 } 82 }
83 } 83 }
84 84
85 - (BOOL)becomeFirstResponder {
86 return [_webView becomeFirstResponder];
87 }
88
85 #pragma mark Accessors 89 #pragma mark Accessors
86 90
87 - (UIScrollView*)scrollView { 91 - (UIScrollView*)scrollView {
88 return _scrollView.get(); 92 return _scrollView.get();
89 } 93 }
90 94
91 - (UIView*)webView { 95 - (UIView*)webView {
92 return _webView.get(); 96 return _webView.get();
93 } 97 }
94 98
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
127 131
128 - (void)updateWebViewFrame { 132 - (void)updateWebViewFrame {
129 CGRect webViewFrame = self.bounds; 133 CGRect webViewFrame = self.bounds;
130 webViewFrame.size.height -= _topContentPadding; 134 webViewFrame.size.height -= _topContentPadding;
131 webViewFrame.origin.y += _topContentPadding; 135 webViewFrame.origin.y += _topContentPadding;
132 136
133 self.webView.frame = webViewFrame; 137 self.webView.frame = webViewFrame;
134 } 138 }
135 139
136 @end 140 @end
OLDNEW
« no previous file with comments | « ios/web/web_state/crw_web_view_proxy_impl.mm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698