| OLD | NEW |
| (Empty) | |
| 1 // Copyright 2012 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_WEB_STATE_UI_CRW_STATIC_FILE_WEB_VIEW_H_ |
| 6 #define IOS_WEB_WEB_STATE_UI_CRW_STATIC_FILE_WEB_VIEW_H_ |
| 7 |
| 8 #import <UIKit/UIKit.h> |
| 9 |
| 10 #import "ios/web/net/crw_request_tracker_delegate.h" |
| 11 |
| 12 namespace web { |
| 13 class BrowserState; |
| 14 } |
| 15 |
| 16 // A subclass of UIWebView that specializes in presenting static html file |
| 17 // content. Use this type of UIWebView that needs to display static HTML |
| 18 // content from application bundle. |
| 19 // TODO(shreyasv): Remove this class, since nobody is using it. |
| 20 @interface CRWStaticFileWebView : UIWebView<CRWRequestTrackerDelegate> |
| 21 |
| 22 // Creates a new UIWebView associated with the given |browserState|. |
| 23 // |browserState| may be nullptr. |
| 24 - (instancetype)initWithFrame:(CGRect)frame |
| 25 browserState:(web::BrowserState*)browserState; |
| 26 |
| 27 // Returns whether the request should be allowed for rendering into a |
| 28 // special UIWebView that allows static file content. |
| 29 // TODO(marq): Since this is only used to inject a FileRequestVerfier into |
| 30 // HttpProtocolHandler, instead make this a method that returns a block of |
| 31 // that type. |
| 32 + (BOOL)isStaticFileRequest:(NSURLRequest*)request; |
| 33 |
| 34 @end |
| 35 |
| 36 #endif // IOS_WEB_WEB_STATE_UI_CRW_STATIC_FILE_WEB_VIEW_H_ |
| OLD | NEW |