| OLD | NEW |
| 1 // Copyright 2012 The Chromium Authors. All rights reserved. | 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 | 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 #ifndef IOS_CHROME_BROWSER_UI_STATIC_CONTENT_STATIC_HTML_VIEW_CONTROLLER_H_ | 5 #ifndef IOS_CHROME_BROWSER_UI_STATIC_CONTENT_STATIC_HTML_VIEW_CONTROLLER_H_ |
| 6 #define IOS_CHROME_BROWSER_UI_STATIC_CONTENT_STATIC_HTML_VIEW_CONTROLLER_H_ | 6 #define IOS_CHROME_BROWSER_UI_STATIC_CONTENT_STATIC_HTML_VIEW_CONTROLLER_H_ |
| 7 | 7 |
| 8 #import <UIKit/UIKit.h> | 8 #import <UIKit/UIKit.h> |
| 9 #import <WebKit/WebKit.h> | 9 #import <WebKit/WebKit.h> |
| 10 | 10 |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 43 // Init with the IDR_ constant that point to a string with the given encoding. | 43 // Init with the IDR_ constant that point to a string with the given encoding. |
| 44 - (id)initWithResourceId:(int)resourceId encoding:(NSStringEncoding)encoding; | 44 - (id)initWithResourceId:(int)resourceId encoding:(NSStringEncoding)encoding; |
| 45 | 45 |
| 46 @end | 46 @end |
| 47 | 47 |
| 48 // Displays html pages either located in the application bundle, the application | 48 // Displays html pages either located in the application bundle, the application |
| 49 // data directory, or obtained by a |HtmlGenerator|. | 49 // data directory, or obtained by a |HtmlGenerator|. |
| 50 @interface StaticHtmlViewController : NSObject | 50 @interface StaticHtmlViewController : NSObject |
| 51 | 51 |
| 52 // The web view that is displaying the content. It is lazily created. | 52 // The web view that is displaying the content. It is lazily created. |
| 53 @property(nonatomic, readonly) WKWebView* webView; | 53 @property(nonatomic, readonly, weak) WKWebView* webView; |
| 54 | 54 |
| 55 // Returns the web controller scrollview. | 55 // Returns the web controller scrollview. |
| 56 - (UIScrollView*)scrollView; | 56 - (UIScrollView*)scrollView; |
| 57 | 57 |
| 58 // Initialization method. |resource| is the location of the static page to | 58 // Initialization method. |resource| is the location of the static page to |
| 59 // display, relative to the root of the application bundle. |browserState| is | 59 // display, relative to the root of the application bundle. |browserState| is |
| 60 // the user browser state to use for loading resources and must not be null. | 60 // the user browser state to use for loading resources and must not be null. |
| 61 - (instancetype)initWithResource:(NSString*)resource | 61 - (instancetype)initWithResource:(NSString*)resource |
| 62 browserState:(web::BrowserState*)browserState; | 62 browserState:(web::BrowserState*)browserState; |
| 63 | 63 |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 115 // Set a |CRWNativeContentDelegate| that will be notified each time the title of | 115 // Set a |CRWNativeContentDelegate| that will be notified each time the title of |
| 116 // the page changes. | 116 // the page changes. |
| 117 - (void)setDelegate:(id<CRWNativeContentDelegate>)delegate; | 117 - (void)setDelegate:(id<CRWNativeContentDelegate>)delegate; |
| 118 | 118 |
| 119 // Enables or disables the scrolling in the native view. | 119 // Enables or disables the scrolling in the native view. |
| 120 - (void)setScrollEnabled:(BOOL)enabled; | 120 - (void)setScrollEnabled:(BOOL)enabled; |
| 121 | 121 |
| 122 @end | 122 @end |
| 123 | 123 |
| 124 #endif // IOS_CHROME_BROWSER_UI_STATIC_CONTENT_STATIC_HTML_VIEW_CONTROLLER_H_ | 124 #endif // IOS_CHROME_BROWSER_UI_STATIC_CONTENT_STATIC_HTML_VIEW_CONTROLLER_H_ |
| OLD | NEW |