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

Side by Side Diff: ios/web_view/public/cwv_scroll_view.h

Issue 2842953002: Implement CWVWebView.scrollView. (Closed)
Patch Set: Apply review comments. Created 3 years, 7 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_view/public/ChromeWebView.h ('k') | ios/web_view/public/cwv_scroll_view_delegate.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2017 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef IOS_WEB_VIEW_PUBLIC_CWV_SCROLL_VIEW_H_
6 #define IOS_WEB_VIEW_PUBLIC_CWV_SCROLL_VIEW_H_
7
8 #import <ChromeWebView/cwv_export.h>
9 #import <CoreGraphics/CoreGraphics.h>
10 #import <Foundation/Foundation.h>
11 #import <UIKit/UIKit.h>
12
13 @protocol CWVScrollViewDelegate;
14
15 // Scroll view inside the web view. This is not a subclass of UIScrollView
16 // because the underlying //ios/web API only exposes a proxy object of the
17 // scroll view, not the raw UIScrollView.
18 //
19 // These methods are forwarded to the internal UIScrollView. Please see the
20 // <UIKit/UIScrollView.h> documentation for details about the following methods.
21 //
22 // TODO(crbug.com/719323): Add nullability annotations.
23 CWV_EXPORT
24 @interface CWVScrollView : NSObject
25
26 @property(nonatomic, readonly) CGRect bounds;
27 @property(nonatomic) CGPoint contentOffset;
28 @property(nonatomic, weak) id<CWVScrollViewDelegate> delegate;
29 @property(nonatomic, readonly, getter=isDragging) BOOL dragging;
30
31 // KVO compliant.
32 @property(nonatomic, readonly) CGSize contentSize;
33
34 // Be careful when using this property. There's a bug with the
35 // underlying WKWebView where the web view does not respect contentInsets
36 // properly when laying out content and calculating innerHeight for Javascript.
37 // Content is laid out based on the entire height of the web view rather than
38 // the height between the top and bottom insets.
39 // https://bugs.webkit.org/show_bug.cgi?id=134230
40 // rdar://23584409 (not available on Open Radar)
41 @property(nonatomic) UIEdgeInsets contentInset;
42
43 - (void)addGestureRecognizer:(UIGestureRecognizer*)gestureRecognizer;
44
45 @end
46
47 #endif // IOS_WEB_VIEW_PUBLIC_CWV_SCROLL_VIEW_H_
OLDNEW
« no previous file with comments | « ios/web_view/public/ChromeWebView.h ('k') | ios/web_view/public/cwv_scroll_view_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698