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

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

Issue 2627093003: Reuse context menu in StaticHTMLViewController (Closed)
Patch Set: fix DEPS Created 3 years, 11 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
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
11 #import "ios/chrome/browser/ui/url_loader.h" 11 #import "ios/chrome/browser/ui/url_loader.h"
12 #import "ios/web/public/block_types.h" 12 #import "ios/web/public/block_types.h"
13 13
14 @protocol CRWNativeContentDelegate; 14 @protocol CRWNativeContentDelegate;
15 @protocol CRWContextMenuControllerDelegate;
15 16
16 namespace web { 17 namespace web {
17 class BrowserState; 18 class BrowserState;
18 struct Referrer; 19 struct Referrer;
19 } 20 }
20 21
21 // Callback for the HtmlGenerator protocol. 22 // Callback for the HtmlGenerator protocol.
22 typedef void (^HtmlCallback)(NSString*); 23 typedef void (^HtmlCallback)(NSString*);
23 24
24 // An object that can generate HTML to be displayed. 25 // An object that can generate HTML to be displayed.
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 // generation method will be called each time reload is called. |browserState| 66 // 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. 67 // is the user browser state to use for loading resources and must not be null.
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.
jif 2017/01/12 17:13:12 Say that |contextMenuDelegate| can be nil.
Olivier 2017/01/13 10:20:25 Argument removed.
76 - (instancetype)initWithFileURL:(const GURL&)fileURL 77 - (instancetype)initWithFileURL:(const GURL&)fileURL
77 allowingReadAccessToURL:(const GURL&)resourcesRoot 78 allowingReadAccessToURL:(const GURL&)resourcesRoot
78 browserState:(web::BrowserState*)browserState; 79 browserState:(web::BrowserState*)browserState
80 contextMenuDelegate:
81 (id<CRWContextMenuControllerDelegate>)contextMenuDelegate;
79 82
80 // Set the |loader| to use to allow navigation to external URL. The |referrer| 83 // Set the |loader| to use to allow navigation to external URL. The |referrer|
81 // is the URL that will be used as referrer for those navigations. 84 // is the URL that will be used as referrer for those navigations.
82 - (void)setLoader:(id<UrlLoader>)loader referrer:(const web::Referrer&)referrer; 85 - (void)setLoader:(id<UrlLoader>)loader referrer:(const web::Referrer&)referrer;
83 86
84 // Asynchronously executes the supplied JavaScript. Calls |completionHandler| 87 // Asynchronously executes the supplied JavaScript. Calls |completionHandler|
85 // with results of the execution. If the controller cannot execute JS at the 88 // with results of the execution. If the controller cannot execute JS at the
86 // moment, |completionHandler| is called with an NSError. The 89 // moment, |completionHandler| is called with an NSError. The
87 // |completionHandler| can be nil. 90 // |completionHandler| can be nil.
88 - (void)executeJavaScript:(NSString*)script 91 - (void)executeJavaScript:(NSString*)script
(...skipping 25 matching lines...) Expand all
114 // Set a |CRWNativeContentDelegate| that will be notified each time the title of 117 // Set a |CRWNativeContentDelegate| that will be notified each time the title of
115 // the page changes. 118 // the page changes.
116 - (void)setDelegate:(id<CRWNativeContentDelegate>)delegate; 119 - (void)setDelegate:(id<CRWNativeContentDelegate>)delegate;
117 120
118 // Enables or disables the scrolling in the native view. 121 // Enables or disables the scrolling in the native view.
119 - (void)setScrollEnabled:(BOOL)enabled; 122 - (void)setScrollEnabled:(BOOL)enabled;
120 123
121 @end 124 @end
122 125
123 #endif // IOS_CHROME_BROWSER_UI_STATIC_CONTENT_STATIC_HTML_VIEW_CONTROLLER_H_ 126 #endif // IOS_CHROME_BROWSER_UI_STATIC_CONTENT_STATIC_HTML_VIEW_CONTROLLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698