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

Side by Side Diff: ios/chrome/browser/ui/static_content/static_html_view_controller.h

Issue 2704383003: Error pages: Break retain cycle NativeContent/StaticHTMLViewController (Closed)
Patch Set: Created 3 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 | « no previous file | ios/chrome/browser/web/BUILD.gn » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
64 // Initialization method. |generator| will produce the html to display. Its 64 // Initialization method. |generator| will produce the html to display. Its
65 // generation method will be called each time reload is called. |browserState| 65 // generation method will be called each time reload is called. |browserState|
66 // is the user browser state to use for loading resources and must not be null. 66 // is the user browser state to use for loading resources and must not be null.
67 // |StaticHtmlViewController| retains |generator|.
67 - (instancetype)initWithGenerator:(id<HtmlGenerator>)generator 68 - (instancetype)initWithGenerator:(id<HtmlGenerator>)generator
68 browserState:(web::BrowserState*)browserState; 69 browserState:(web::BrowserState*)browserState;
69 70
70 // Initialization method. |fileURL| is the location of the page in the 71 // Initialization method. |fileURL| is the location of the page in the
71 // application data directory. |resourcesRoot| is the root directory where the 72 // application data directory. |resourcesRoot| is the root directory where the
72 // page pointed by |fileURL| can find its resources. Web view will get read 73 // page pointed by |fileURL| can find its resources. Web view will get read
73 // access to the |resourcesRoot| directory. |fileURL| must be contained in 74 // access to the |resourcesRoot| directory. |fileURL| must be contained in
74 // |resourcesRoot|. |browserState| is the user browser state to use for 75 // |resourcesRoot|. |browserState| is the user browser state to use for
75 // loading resources and must not be null. 76 // loading resources and must not be null.
76 - (instancetype)initWithFileURL:(const GURL&)fileURL 77 - (instancetype)initWithFileURL:(const GURL&)fileURL
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 // 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
115 // the page changes. 116 // the page changes.
116 - (void)setDelegate:(id<CRWNativeContentDelegate>)delegate; 117 - (void)setDelegate:(id<CRWNativeContentDelegate>)delegate;
117 118
118 // Enables or disables the scrolling in the native view. 119 // Enables or disables the scrolling in the native view.
119 - (void)setScrollEnabled:(BOOL)enabled; 120 - (void)setScrollEnabled:(BOOL)enabled;
120 121
121 @end 122 @end
122 123
123 #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_
OLDNEW
« no previous file with comments | « no previous file | ios/chrome/browser/web/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698