| Index: ios/web_view/public/criwv_web_view_delegate.h
|
| diff --git a/ios/web_view/public/criwv_web_view_delegate.h b/ios/web_view/public/criwv_web_view_delegate.h
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..6c00c03004862b1ffff352d36396b62b0a30c864
|
| --- /dev/null
|
| +++ b/ios/web_view/public/criwv_web_view_delegate.h
|
| @@ -0,0 +1,42 @@
|
| +// Copyright 2014 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +#ifndef IOS_WEB_VIEW_PUBLIC_CRIWV_WEB_VIEW_DELEGATE_H_
|
| +#define IOS_WEB_VIEW_PUBLIC_CRIWV_WEB_VIEW_DELEGATE_H_
|
| +
|
| +#import <Foundation/Foundation.h>
|
| +
|
| +@protocol CRIWVTranslateDelegate;
|
| +@protocol CRIWVWebView;
|
| +
|
| +typedef NS_OPTIONS(NSUInteger, CRIWVWebViewUpdateType) {
|
| + CRIWVWebViewUpdateTypeProgress = 1 << 0,
|
| + CRIWVWebViewUpdateTypeTitle = 1 << 1,
|
| + CRIWVWebViewUpdateTypeURL = 1 << 2
|
| +};
|
| +
|
| +// Delegate protocol for CRIWVWebViews. Allows embedders to customize web view
|
| +// behavior and receive updates on page load progress.
|
| +@protocol CRIWVWebViewDelegate<NSObject>
|
| +
|
| +@optional
|
| +
|
| +- (void)webView:(id<CRIWVWebView>)webView
|
| + didFinishLoadingWithURL:(NSURL*)url
|
| + loadSuccess:(BOOL)loadSuccess;
|
| +
|
| +- (void)webView:(id<CRIWVWebView>)webView
|
| + didUpdateWithChanges:(CRIWVWebViewUpdateType)changes;
|
| +
|
| +- (id<CRIWVTranslateDelegate>)translateDelegate;
|
| +
|
| +// Returns YES if the web view should load |url| or NO for a custom handling.
|
| +- (BOOL)webView:(id<CRIWVWebView>)webView
|
| + shouldOpenURL:(NSURL*)url
|
| + mainDocumentURL:(NSURL*)mainDocumentURL
|
| + linkClicked:(BOOL)linkClicked;
|
| +
|
| +@end
|
| +
|
| +#endif // IOS_WEB_VIEW_PUBLIC_CRIWV_WEB_VIEW_DELEGATE_H_
|
|
|